]> Sergey Matveev's repositories - public-inbox.git/commitdiff
cgi: remove static file generation support for now
authorEric Wong <e@80x24.org>
Sat, 22 Aug 2015 05:06:55 +0000 (05:06 +0000)
committerEric Wong <e@80x24.org>
Sat, 22 Aug 2015 05:07:18 +0000 (05:07 +0000)
We may not support this after all, CGI.pm is already
legacy-enough and far more powerful.

public-inbox.cgi

index 5c6dfe8a3c5a298ba3b7f4591c4dce0223b041b8..63663f32c4972cf040cbdfe890d7bf2841d4cda3 100755 (executable)
@@ -32,16 +32,13 @@ my $ret = PublicInbox::WWW::run($req, $req->request_method);
 
 my $out = select;
 $out->binmode;
-if (@ARGV && $ARGV[0] eq 'static') {
-       $out->write($ret->[2]->[0]); # only show the body
-} else { # CGI
-       if (ref($ret) eq 'CODE') {
-               $ret->(*dump_header);
-       } else {
-               my ($status, $headers, $body) = @$ret;
 
-               dump_header([$status, $headers])->write($body->[0]);
-       }
+if (ref($ret) eq 'CODE') {
+       $ret->(*dump_header);
+} else {
+       my ($status, $headers, $body) = @$ret;
+
+       dump_header([$status, $headers])->write($body->[0]);
 }
 
 sub dump_header {