diff options
author | Eric Wong <e@80x24.org> | 2014-04-28 22:09:30 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-28 22:09:30 +0000 |
commit | b79559bb07595e5e29f45d5791bfb53cb6f6a06b (patch) | |
tree | 852323f2110289642fb848c4b01c9f88559e4058 /public-inbox.cgi | |
parent | 132d287d0a1a88dcb84d2a4dbeae7afd5a8dddbe (diff) | |
download | public-inbox-b79559bb07595e5e29f45d5791bfb53cb6f6a06b.tar.gz |
CGI.pm is on its way out, so do not make it a hard requirement for Plack users. We still support CGI-only installations because some sysadmins and distros may be very conservative.
Diffstat (limited to 'public-inbox.cgi')
-rwxr-xr-x | public-inbox.cgi | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public-inbox.cgi b/public-inbox.cgi index 54ff0159..93147124 100755 --- a/public-inbox.cgi +++ b/public-inbox.cgi @@ -12,7 +12,6 @@ use 5.008; use strict; use warnings; -use CGI qw(:cgi -nosticky); # PSGI/FastCGI/mod_perl compat use PublicInbox::Config; use URI::Escape qw(uri_escape_utf8 uri_unescape); our $LISTNAME_RE = qr!\A/([\w\.\-]+)!; @@ -21,6 +20,8 @@ BEGIN { $pi_config = PublicInbox::Config->new; # TODO: detect and reload config as needed if ($ENV{MOD_PERL}) { + require CGI; + $CGI::NOSTICKY = 1; CGI->compile; } } @@ -32,6 +33,7 @@ if ($ENV{PI_PLACKUP}) { # which confuses CGI.pm when generating self_url. # RFC 3875 does not mention REQUEST_URI at all, # so nuke it since CGI.pm functions without it. + require CGI; delete $ENV{REQUEST_URI}; my $req = CGI->new; my $ret = main($req, $req->request_method); |