summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-10-30 16:51:16 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-10-30 16:51:16 (GMT)
commitc99874da83d8b03e8257ab69dc2061df310f7b52 (patch)
tree00177edde060aad0c99c93ca8bdba01a7ef3f961 /Lib/http/server.py
parent96c03df771199196f4580d4fd32f6cea902fb2ec (diff)
parenta50f89954d206e063d653b847a4b5bbc8c0abb8c (diff)
downloadcpython-c99874da83d8b03e8257ab69dc2061df310f7b52.zip
cpython-c99874da83d8b03e8257ab69dc2061df310f7b52.tar.gz
cpython-c99874da83d8b03e8257ab69dc2061df310f7b52.tar.bz2
merge 3.3 (#19435)
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index 4b249de..7b577b4 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -995,18 +995,17 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
def run_cgi(self):
"""Execute a CGI script."""
- path = self.path
dir, rest = self.cgi_info
- i = path.find('/', len(dir) + 1)
+ i = rest.find('/')
while i >= 0:
- nextdir = path[:i]
- nextrest = path[i+1:]
+ nextdir = rest[:i]
+ nextrest = rest[i+1:]
scriptdir = self.translate_path(nextdir)
if os.path.isdir(scriptdir):
dir, rest = nextdir, nextrest
- i = path.find('/', len(dir) + 1)
+ i = rest.find('/')
else:
break