* [PATCH] cgi: remove static file generation support for now
@ 2015-08-22 5:09 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-08-22 5:09 UTC (permalink / raw)
To: meta
We may not support this after all, CGI.pm is already
legacy-enough and far more powerful.
---
public-inbox.cgi | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/public-inbox.cgi b/public-inbox.cgi
index 5c6dfe8..63663f3 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 {
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-22 5:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22 5:09 [PATCH] cgi: remove static file generation support for now Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).