diff options
author | Eric Wong <e@80x24.org> | 2014-04-10 20:06:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-11 22:23:58 +0000 |
commit | 725e812536984403e862bd8c591b63d3bc58b450 (patch) | |
tree | 8968fce77a5cde1062efce8d24fed56e740c20eb | |
parent | b60a668b43b0a279c2a1d621c009396bea1a4898 (diff) | |
download | public-inbox-725e812536984403e862bd8c591b63d3bc58b450.tar.gz |
Hopefully it's slightly easier-to-follow this way.
-rwxr-xr-x | public-inbox-cgi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/public-inbox-cgi b/public-inbox-cgi index 828c94c1..e4e2e3a2 100755 --- a/public-inbox-cgi +++ b/public-inbox-cgi @@ -99,6 +99,8 @@ sub invalid_list_mid { undef; } +# /$LISTNAME/index.atom.xml -> Atom feed +# /$LISTNAME/all.atom.xml -> Atom feed, includes replies sub get_atom { my ($ctx, $cgi, $top) = @_; require PublicInbox::Feed; @@ -113,6 +115,7 @@ sub get_atom { ]; } +# /$LISTNAME/?before=$GIT_COMMIT -> HTML only sub get_index { my ($ctx, $cgi, $top) = @_; require PublicInbox::Feed; @@ -127,6 +130,7 @@ sub get_index { ]; } +# just returns a string ref for the blob in the current ctx sub mid2blob { my ($ctx) = @_; local $ENV{GIT_DIR} = $ctx->{git_dir}; @@ -137,12 +141,14 @@ sub mid2blob { $? == 0 ? \$blob : undef; } +# /$LISTNAME/m/$MESSAGE_ID.txt -> raw original sub get_mid_txt { my ($ctx, $cgi) = @_; my $x = mid2blob($ctx); $x ? [ "200 OK", {'Content-Type' => 'text/plain'}, $$x ] : r404(); } +# only used for CGI and static file generation modes sub set_binmode { my ($headers) = @_; if ($headers->{'Content-Type'} eq 'text/plain') { |