From: Andy Grundman Date: Thu, 8 Dec 2005 18:24:26 +0000 (+0000) Subject: Fixed warning in Engine::CGI when PATH_INFO is undef X-Git-Tag: 5.7099_04~782 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=e701c5c61735b6aae5332b16522bbc800a626896 Fixed warning in Engine::CGI when PATH_INFO is undef --- diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 9f6698d..fae6a9a 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -137,7 +137,7 @@ sub prepare_path { $port = $c->request->secure ? 443 : 80; } - my $path = $base_path . $ENV{PATH_INFO}; + my $path = $base_path . ( $ENV{PATH_INFO} || '' ); $path =~ s{^/+}{}; my $uri = URI->new; diff --git a/t/conf/extra.conf.in b/t/conf/extra.conf.in index fff041d..aaea739 100644 --- a/t/conf/extra.conf.in +++ b/t/conf/extra.conf.in @@ -16,4 +16,5 @@ FastCgiIpcDir @ServerRoot@/tmp/tmp FastCgiServer @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl -idle-timeout 300 -processes 1 ScriptAlias /fastcgi/ @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl/ + Alias /noslash @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl diff --git a/t/optional_apache-fastcgi.pl b/t/optional_apache-fastcgi.pl index 759febd..9f34939 100755 --- a/t/optional_apache-fastcgi.pl +++ b/t/optional_apache-fastcgi.pl @@ -31,7 +31,7 @@ File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' ); # remove TestApp's tests so Apache::Test doesn't try to run them rmtree 't/tmp/TestApp/t'; -$ENV{CATALYST_SERVER} = 'http://localhost:8529/fastcgi'; +$ENV{CATALYST_SERVER} = 'http://localhost:8529/noslash'; Apache::TestRun->new->run(@ARGV);