[Bug 736604] perl-FCGI, fcgi: Certain environment variables shared between first and subsequent HTTP requests
bugzilla at redhat.com
bugzilla at redhat.com
Thu Sep 8 08:48:39 UTC 2011
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=736604
--- Comment #4 from Jan Lieskovsky <jlieskov at redhat.com> 2011-09-08 04:48:37 EDT ---
Sample code snippet (from Debian bug report [1]) to demonstrate the deficiency:
<quote>
#! /usr/bin/perl -w
use CGI::Fast qw(:standard :cgi-lib);
use Data::Dumper;
use strict;
while ( my $cgi = getRequest() ) {
print $cgi->header();
print "<pre>========= ID:$$ =========\n";
while (my ($key,$value) = each %ENV) {
print "$key=$value\n";
}
print "========= VARS =========\n";
print Dumper($cgi->Vars());
print "========= COOKIE =========\n";
print Dumper($cgi->cookie());
print ".</pre>";
#%ENV = undef;
}
sub getRequest {
%ENV = () if $main::clearENV; # Clear the ENV
$main::clearENV = 1; # Do not clear the ENV the first time
otherwise the Fast::CGI "slow mode" will not work anymore
return new CGI::Fast;
}
I used 2 wget together to examine it:
(posted to the proxy server to disable caching)
$ http_proxy=http://proxy:8080 watch -d 'wget -qO - --post-data='xxx' --header
"Cookie: usernaam=test" http://www.myserver.nl/env.fcgi'
$ watch -d 'wget -qO - http://www.myserver.nl/env.fcgi'
</quote>
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the perl-devel
mailing list