diff --git a/Lib/http/server.py b/Lib/http/server.py index 2ddef52beb0..4b249de7814 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -789,7 +789,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)