Hi,
The fix for RT #66298 ( version 0.06 ) appears to have broken the tests
for my own module POE::Filter::HTTP::Parser which uses HTTP::Parser.
GET / HTTP/1.1 requests were getting parsed with '//' as the path.
Attached is a patch to only do the double slash fix when the uri
actually begins with a double slash.
Many thanks in advance.
Subject: | slash.diff |
diff --git a/Parser.pm b/Parser.pm
index 24b88cf..995f43e 100644
--- a/Parser.pm
+++ b/Parser.pm
@@ -265,7 +265,7 @@ sub _parse_header {
# know the scheme, otherwise it will misinterpret paths that start with
# // as being scheme-relative uris, and will interpret the first
# component after // as the host (see rfc 2616)
- $uri = "//$uri" if $uri =~ m(^/);
+ $uri = "//$uri" if $uri =~ m(^//);
$obj = $self->{obj} = HTTP::Request->new($method, URI->new($uri));
}