From: Eric Wong Date: Sat, 22 Aug 2015 05:06:55 +0000 (+0000) Subject: cgi: remove static file generation support for now X-Git-Tag: v1.0.0~1010 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=761323389ca4eeda7803b5d623b37b675d034588;p=public-inbox.git cgi: remove static file generation support for now We may not support this after all, CGI.pm is already legacy-enough and far more powerful. --- diff --git a/public-inbox.cgi b/public-inbox.cgi index 5c6dfe8a..63663f32 100755 --- a/public-inbox.cgi +++ b/public-inbox.cgi @@ -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 {