Skip to content

Instantly share code, notes, and snippets.

@hayajo
Created July 4, 2011 06:06
Show Gist options
  • Save hayajo/1062957 to your computer and use it in GitHub Desktop.
Save hayajo/1062957 to your computer and use it in GitHub Desktop.
Plack::HTTPParser::PP
--- Plack/HTTPParser/PP.pm.org 2011-05-26 16:21:15.000000000 +0900
+++ Plack/HTTPParser/PP.pm 2011-07-01 17:23:18.000000000 +0900
@@ -52,7 +52,7 @@
$env->{REQUEST_URI} = $uri;
my($path, $query) = ( $uri =~ /^([^?]*)(?:\?(.*))?$/s );
- for ($path, $query) { s/\#.*$// if length } # dumb clients sending URI fragments
+ for ($path, $query) { s/\#.*$// if (defined && length) } # dumb clients sending URI fragments
$env->{PATH_INFO} = URI::Escape::uri_unescape($path);
$env->{QUERY_STRING} = $query || '';
@hayajo
Copy link
Author

hayajo commented Jul 5, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment