mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
merge 3.2 (#19435)
This commit is contained in:
commit
a50f89954d
3 changed files with 17 additions and 5 deletions
|
@ -987,18 +987,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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue