mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
SF bug #770601: CGIHTTPServer and environment variables (bug + solution)
(contributed by Vincent Delft.) The script updated os.environ but failed to pass the whole environment to the child process (the CGI script).
This commit is contained in:
parent
7a6c733c3b
commit
92f200b569
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
pass
|
||||
os.dup2(self.rfile.fileno(), 0)
|
||||
os.dup2(self.wfile.fileno(), 1)
|
||||
os.execve(scriptfile, args, env)
|
||||
os.execve(scriptfile, args, os.environ)
|
||||
except:
|
||||
self.server.handle_error(self.request, self.client_address)
|
||||
os._exit(127)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue