user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] cgi: remove static file generation support for now
@ 2015-08-22  5:09  7% Eric Wong
  0 siblings, 0 replies; 1+ results
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	[relevance 7%]

Results 1-1 of 1 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2015-08-22  5:09  7% [PATCH] cgi: remove static file generation support for now Eric Wong

Code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

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).