[Python-checkins] python/dist/src/Lib CGIHTTPServer.py,1.26,1.27
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Tue, 20 Aug 2002 12:55:08 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv32141
Modified Files:
CGIHTTPServer.py
Log Message:
SF patch 595846 by Brett Cannon: Update environ for CGIHTTPServer.py
This patch causes CGIHTTPServer to update os.environ regardless of how
it tries to handle calls (fork, popen*, etc.).
Backport bugfix candidate.
Index: CGIHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/CGIHTTPServer.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** CGIHTTPServer.py 1 Aug 2002 21:12:35 -0000 1.26
--- CGIHTTPServer.py 20 Aug 2002 19:55:06 -0000 1.27
***************
*** 183,186 ****
--- 183,187 ----
'HTTP_USER_AGENT', 'HTTP_COOKIE'):
env.setdefault(k, "")
+ so.environ.update(env)
self.send_response(200, "Script output follows")
***************
*** 222,226 ****
else:
popenx = os.popen2
- os.environ.update(env)
cmdline = scriptfile
if self.is_python(scriptfile):
--- 223,226 ----
***************
*** 260,264 ****
else:
# Other O.S. -- execute script in this process
- os.environ.update(env)
save_argv = sys.argv
save_stdin = sys.stdin
--- 260,263 ----