Fixed MP2, removed dependency of libapreq in MP engines, fixed C::E::C::APR
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / CGI / Base.pm
index 3b62454..a76537b 100644 (file)
@@ -121,7 +121,9 @@ sub prepare_path {
         $base = $base->canonical->as_string;
     }
 
+    my $location = $ENV{SCRIPT_NAME} || '/';
     my $path = $ENV{PATH_INFO} || '/';
+    $path =~ s/^($location)?\///;
     $path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
     $path =~ s/^\///;