Fixed warning in Engine::CGI when PATH_INFO is undef
Andy Grundman [Thu, 8 Dec 2005 18:24:26 +0000 (18:24 +0000)]
lib/Catalyst/Engine/CGI.pm
t/conf/extra.conf.in
t/optional_apache-fastcgi.pl

index 9f6698d..fae6a9a 100644 (file)
@@ -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;
index fff041d..aaea739 100644 (file)
@@ -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
 </IfModule>
index 759febd..9f34939 100755 (executable)
@@ -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);