X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FCGI%2FBase.pm;h=8db3fe6be2346949d71eba6015ae59a316405f46;hb=66294129a6520edc031aa7a43fc9bdfce669af15;hp=3b624541f7a97753d6be8047ff74a41156638ba4;hpb=e2fd5b5f162a33895ad401a8d31fca481c478a8c;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/CGI/Base.pm b/lib/Catalyst/Engine/CGI/Base.pm index 3b62454..8db3fe6 100644 --- a/lib/Catalyst/Engine/CGI/Base.pm +++ b/lib/Catalyst/Engine/CGI/Base.pm @@ -69,6 +69,7 @@ sub prepare_connection { $c->request->address( $ENV{REMOTE_ADDR} ); $c->request->hostname( $ENV{REMOTE_HOST} ); $c->request->protocol( $ENV{SERVER_PROTOCOL} ); + $c->request->user( $ENV{REMOTE_USER} ); if ( $ENV{HTTPS} || $ENV{SERVER_PORT} == 443 ) { $c->request->secure(1); @@ -121,7 +122,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/^\///;