[Bug 736604] perl-FCGI, fcgi: Certain environment variables shared between first and subsequent HTTP requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel


[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux