mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Minor code improvement. Review comment by Eric V. Smith
This commit is contained in:
parent
f63d558007
commit
600b735062
1 changed files with 1 additions and 1 deletions
|
@ -781,7 +781,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||
path = path.split('?',1)[0]
|
||||
path = path.split('#',1)[0]
|
||||
# Don't forget explicit trailing slash when normalizing. Issue17324
|
||||
trailing_slash = True if path.rstrip().endswith('/') else False
|
||||
trailing_slash = path.rstrip().endswith('/')
|
||||
path = posixpath.normpath(urllib.parse.unquote(path))
|
||||
words = path.split('/')
|
||||
words = filter(None, words)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue