Fixed uninitialized warnings with HTTP::Daemon
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / CGI.pm
index 3028080..eb64e4a 100644 (file)
@@ -169,6 +169,10 @@ sub prepare_path {
         my $port   = $ENV{SERVER_PORT} || 80;
         my $path   = $ENV{SCRIPT_NAME} || '/';
 
+        unless ( $path =~ /\/$/ ) {
+            $path .= '/';
+        }
+
         $base = URI->new;
         $base->scheme($scheme);
         $base->host($host);