diff options
author | Facundo Batista <facundobatista@gmail.com> | 2008-02-18 12:48:43 (GMT) |
---|---|---|
committer | Facundo Batista <facundobatista@gmail.com> | 2008-02-18 12:48:43 (GMT) |
commit | d14600ec94abc39dfb83dfccae89d8e7043f3b8b (patch) | |
tree | ee92278c7d0bee4178238c54dac0483f173c9787 /Lib/SimpleHTTPServer.py | |
parent | 759bfc6207e7979d4eaeed2a2ae611e1804aef55 (diff) | |
download | cpython-d14600ec94abc39dfb83dfccae89d8e7043f3b8b.zip cpython-d14600ec94abc39dfb83dfccae89d8e7043f3b8b.tar.gz cpython-d14600ec94abc39dfb83dfccae89d8e7043f3b8b.tar.bz2 |
Issue 1224. Now we support again the double slash in the URL.
Thanks Anthony Lenton.
Diffstat (limited to 'Lib/SimpleHTTPServer.py')
-rw-r--r-- | Lib/SimpleHTTPServer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 86c669e..249e237 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -146,7 +146,8 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """ # abandon query parameters - path = urlparse.urlparse(path)[2] + path = path.split('?',1)[0] + path = path.split('#',1)[0] path = posixpath.normpath(urllib.unquote(path)) words = path.split('/') words = filter(None, words) |