diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-10-30 16:43:44 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-10-30 16:43:44 (GMT) |
commit | ae7894c9538af13afdd816a59b0e2ffc96eb5627 (patch) | |
tree | 22d78d5d3047256e56d849a266b31daba81d2359 /Lib/CGIHTTPServer.py | |
parent | 285e2e8403fb71e305146dc5cc98ad2d350cbaad (diff) | |
parent | 1ef959ac3ddc4d96dfa1a613db5cb206cdaeb662 (diff) | |
download | cpython-ae7894c9538af13afdd816a59b0e2ffc96eb5627.zip cpython-ae7894c9538af13afdd816a59b0e2ffc96eb5627.tar.gz cpython-ae7894c9538af13afdd816a59b0e2ffc96eb5627.tar.bz2 |
merge 2.7.6 release branch
Diffstat (limited to 'Lib/CGIHTTPServer.py')
-rw-r--r-- | Lib/CGIHTTPServer.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py index 47a994c..50e0f7a 100644 --- a/Lib/CGIHTTPServer.py +++ b/Lib/CGIHTTPServer.py @@ -105,18 +105,17 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.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 |