From: Senthil Kumaran Date: Mon, 30 Sep 2013 01:57:42 +0000 (-0700) Subject: Code improvement. Review comment by Eric V. Smith X-Git-Tag: v2.7.6rc1~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a719eed4d9f868acab7dac3e1bd69620c055ad81;p=thirdparty%2FPython%2Fcpython.git Code improvement. Review comment by Eric V. Smith --- diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 1996f4d29ba5..1a1729686587 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -150,7 +150,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.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.unquote(path)) words = path.split('/') words = filter(None, words)