Allow for CATALYST_SERVER settings with a trailing slash
Andy Grundman [Mon, 29 Oct 2007 22:00:00 +0000 (22:00 +0000)]
lib/Catalyst/Test.pm

index 9f2f7be..82a43c1 100644 (file)
@@ -135,7 +135,8 @@ sub remote_request {
     my $server  = URI->new( $ENV{CATALYST_SERVER} );
 
     if ( $server->path =~ m|^(.+)?/$| ) {
-        $server->path("$1");    # need to be quoted
+        my $path = $1;
+        $server->path("$path") if $path;    # need to be quoted
     }
 
     # the request path needs to be sanitised if $server is using a