Skip to content

Commit

Permalink
Fix PATH_INFO from REQUEST_URI for FCGI.
Browse files Browse the repository at this point in the history
  • Loading branch information
KnowZero committed Jun 29, 2012
1 parent 4f68dc4 commit 2c7c44d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Plack/Middleware/IIS6ScriptNameFix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ sub call {
my($self, $env) = @_;

if ($env->{SERVER_SOFTWARE} && $env->{SERVER_SOFTWARE} =~ /IIS\/[6-9]\.[0-9]/) {
my @script_name = split(m!/!, $env->{PATH_INFO});

my ($path) = ( $env->{REQUEST_URI} =~ /^([^?]*)(?:\?.*)?$/s );
$path =~ s/#.*$// if defined && length; # dumb clients sending URI fragments

my @script_name = split(m!/!, URI::Escape::uri_unescape($path));
my @path_translated = split(m!/|\\\\?!, $env->{PATH_TRANSLATED});
my @path_info;

Expand Down

0 comments on commit 2c7c44d

Please sign in to comment.