diff options
author | Richard Mitchell <richard.j.mitchell@gmail.com> | 2012-08-02 11:28:01 +0100 |
---|---|---|
committer | Richard Mitchell <richard.j.mitchell@gmail.com> | 2012-08-02 11:28:01 +0100 |
commit | f2f28106d667d77e6546476f48645a60ef6f3074 (patch) | |
tree | edb3733205a229fe41132732f0a4ec74bad8a2ed | |
parent | cdc59485dc0e8a225347462ac1b11b8b31aa6136 (diff) | |
download | paste-git-f2f28106d667d77e6546476f48645a60ef6f3074.tar.gz |
Fixed parsing of URL paths starting with multiple slashes.double_slash_at_start_of_path_fix
-rw-r--r-- | docs/news.txt | 2 | ||||
-rwxr-xr-x | paste/httpserver.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/docs/news.txt b/docs/news.txt index 4327d77..45b9422 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -15,6 +15,8 @@ hg tip just like normal request bodies are wrapped, keeping WSGI applications from over-reading from the socket. +* Fixed parsing of paths beginning with multiple forward slashes. + 1.7.5.1 ------- 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) |