projects
/
catagits/Catalyst-Runtime.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Engine::HTTP - Fix paths for HTTP requests with scheme and domain in URI.
[catagits/Catalyst-Runtime.git]
/
lib
/
Catalyst
/
Engine
/
HTTP.pm
diff --git
a/lib/Catalyst/Engine/HTTP.pm
b/lib/Catalyst/Engine/HTTP.pm
index
9626f66
..
91fb0a8
100644
(file)
--- a/
lib/Catalyst/Engine/HTTP.pm
+++ b/
lib/Catalyst/Engine/HTTP.pm
@@
-368,6
+368,9
@@
sub _handler {
while (1) {
my ( $path, $query_string ) = split /\?/, $uri, 2;
+ # URI is not the same as path. Remove scheme, domain name and port from it
+ $path =~ s{^https?://[^/?#]+}{};
+
# Initialize CGI environment
local %ENV = (
PATH_INFO => $path || '',