From: KMX Date: Thu, 21 May 2009 21:14:48 +0000 (+0000) Subject: fix for ->engine->env in Catalyst::Engine::CGI & FastCGI (it should be complete now) X-Git-Tag: 5.80005~30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=0c913601ac4ab28c5ffc5b7adb1833b99ac07459 fix for ->engine->env in Catalyst::Engine::CGI & FastCGI (it should be complete now) --- diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 4e3686f..f598cf5 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -233,7 +233,7 @@ sub read_chunk { shift; shift; *STDIN->sysread(@_); } =cut -sub run { shift; shift->handle_request(@_) } +sub run { shift; shift->handle_request( env => \%ENV ) } =head1 SEE ALSO diff --git a/lib/Catalyst/Engine/FastCGI.pm b/lib/Catalyst/Engine/FastCGI.pm index c992dcf..3764bc4 100644 --- a/lib/Catalyst/Engine/FastCGI.pm +++ b/lib/Catalyst/Engine/FastCGI.pm @@ -220,6 +220,12 @@ sub _fix_env my $self = shift; my $env = shift; + # we are gonna add variables from current system environment %ENV to %env + # that contains at this moment just variables taken from FastCGI request + foreach my $k (keys(%ENV)) { + $env->{$k} = $ENV{$k} unless defined($env->{$k}); + } + return unless ( $env->{SERVER_SOFTWARE} ); # If we're running under Lighttpd, swap PATH_INFO and SCRIPT_NAME