Subject: | CGI does not clean globals for CGI::Emulator::PSGI |
When CGI detects mod-perl or ActiveState's PerlEx it resets global
variables, but since CGI does not detect PSGI, it does not clear the
global variables.
Issue may be solved easily in 3 ways:
1.- Modify CGI.pm to recognize PSGI
2.- Modify $ENV{'GATEWAY_INTERFACE'} to emulate PerlEx, which is
currently used only to clear the environment [p2.patch].
3.- Force clear the enviroment using CGI::initialize_globals() [p2.patch]
Subject: | p1.patch |
--- /opt/perl5101/lib/site_perl/5.10.1/CGI/Emulate/PSGI.pm 2009-12-03 00:08:21.000000000 -0430
+++ PSGI.pm 2009-12-02 23:44:31.000000000 -0430
@@ -15,7 +15,7 @@
my $env = shift;
no warnings;
my $environment = {
- GATEWAY_INTERFACE => 'CGI/1.1',
+ GATEWAY_INTERFACE => 'CGI-PerlEx/1.1',
# not in RFC 3875
HTTPS => ( ( $env->{'psgi.url_scheme'} eq 'https' ) ? 'ON' : 'OFF' ),
SERVER_SOFTWARE => "CGI-Emulate-PSGI",
Subject: | p2.patch |
--- /opt/perl5101/lib/site_perl/5.10.1/CGI/Emulate/PSGI.pm 2009-12-03 00:08:21.000000000 -0430
+++ PSGI.pm 2009-12-03 00:07:30.000000000 -0430
@@ -4,6 +4,7 @@
use POSIX 'SEEK_SET';
use HTTP::Response;
use IO::File;
+use CGI;
use 5.008;
our $VERSION = '0.02';
@@ -13,6 +14,7 @@
return sub {
my $env = shift;
+ CGI::initialize_globals();
no warnings;
my $environment = {
GATEWAY_INTERFACE => 'CGI/1.1',