summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
diff options
context:
space:
mode:
authorRichard Mitchell <richard.j.mitchell@gmail.com>2012-08-02 11:28:01 +0100
committerRichard Mitchell <richard.j.mitchell@gmail.com>2012-08-02 11:28:01 +0100
commit9fae57022f1164ea72196dd8e91f73a0463427d8 (patch)
treeedb3733205a229fe41132732f0a4ec74bad8a2ed /paste/httpserver.py
parent2a8717eb4d63f48c5d5c802d7572744828c4890e (diff)
downloadpaste-9fae57022f1164ea72196dd8e91f73a0463427d8.tar.gz
Fixed parsing of URL paths starting with multiple slashes.double_slash_at_start_of_path_fix
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-xpaste/httpserver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/httpserver.py b/paste/httpserver.py
index cd21713..ffc94c3 100755
--- a/paste/httpserver.py
+++ b/paste/httpserver.py
@@ -176,7 +176,8 @@ class WSGIHandlerMixin:
argument can be used to override any settings.
"""
- (scheme, netloc, path, query, fragment) = urlparse.urlsplit(self.path)
+ dummy_url = 'http://dummy%s' % (self.path,)
+ (scheme, netloc, path, query, fragment) = urlparse.urlsplit(dummy_url)
path = urllib.unquote(path)
endslash = path.endswith('/')
path = posixpath.normpath(path)