Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop leaking information across requests #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions perl/FCGI.PL
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,14 @@ sub Request(;***$*$) {

sub accept() {
warn "accept called as a method; you probably wanted to call Accept" if @_;
if (defined %FCGI::ENV) {
%ENV = %FCGI::ENV;
if ( defined($FCGI::ENV) ) {
%ENV = %$FCGI::ENV;
} else {
%FCGI::ENV = %ENV;
$FCGI::ENV = {%ENV};
}
my $rc = Accept($global_request);
for (keys %FCGI::ENV) {
$ENV{$_} = $FCGI::ENV{$_} unless exists $ENV{$_};
for (keys %$FCGI::ENV) {
$ENV{$_} = $FCGI::ENV->{$_} unless exists $ENV{$_};
}

# not SFIO
Expand All @@ -310,7 +310,7 @@ sub accept() {

sub finish() {
warn "finish called as a method; you probably wanted to call Finish" if @_;
%ENV = %FCGI::ENV if (defined %FCGI::ENV);
%ENV = %$FCGI::ENV if defined($FCGI::ENV);

# not SFIO
if (tied (*STDIN)) {
Expand Down