From 725e812536984403e862bd8c591b63d3bc58b450 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Apr 2014 20:06:04 +0000 Subject: cgi: add one-line descriptions for subroutines Hopefully it's slightly easier-to-follow this way. --- public-inbox-cgi | 6 ++++++ 1 file changed, 6 insertions(+) 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') { -- cgit v1.2.3-24-ge0c7