Commit 37be45b3 authored by Yadd's avatar Yadd
Browse files

Remove SCRIPT_NAME from PATH_INFO

parent 4a5bfa63
......@@ -26,8 +26,9 @@ has PATH_INFO => (
lazy => 1,
default => '',
trigger => sub {
$_[0]->{REQUEST_URI} = uri_unescape( $_[0]->{REQUEST_URI} );
$_[0]->{REQUEST_URI} =~ s|//+|/|;
my $tmp = $_[0]->{SCRIPT_NAME};
$_[0]->{PATH_INFO} =~ s|^$tmp|/|;
$_[0]->{PATH_INFO} =~ s|//+|/|g;
},
);
has REQUEST_URI => (
......@@ -36,6 +37,7 @@ has REQUEST_URI => (
trigger => sub {
$_[0]->{unparsed_uri} = $_[0]->{REQUEST_URI};
$_[0]->{REQUEST_URI} = uri_unescape( $_[0]->{REQUEST_URI} );
$_[0]->{REQUEST_URI} =~ s|//+|/|g;
},
);
has unparsed_uri => ( is => 'rw', isa => 'Str' );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment