mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
Issue 1224. Now we support again the double slash in the URL.
Thanks Anthony Lenton.
This commit is contained in:
parent
759bfc6207
commit
d14600ec94
3 changed files with 45 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue