[Python-checkins] python/dist/src/Lib CGIHTTPServer.py,1.31,1.32
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sun, 13 Jul 2003 23:56:34 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv32046
Modified Files:
CGIHTTPServer.py
Log Message:
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).
Index: CGIHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/CGIHTTPServer.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** CGIHTTPServer.py 29 Jun 2003 05:06:56 -0000 1.31
--- CGIHTTPServer.py 14 Jul 2003 06:56:32 -0000 1.32
***************
*** 216,220 ****
os.dup2(self.rfile.fileno(), 0)
os.dup2(self.wfile.fileno(), 1)
! os.execve(scriptfile, args, env)
except:
self.server.handle_error(self.request, self.client_address)
--- 216,220 ----
os.dup2(self.rfile.fileno(), 0)
os.dup2(self.wfile.fileno(), 1)
! os.execve(scriptfile, args, os.environ)
except:
self.server.handle_error(self.request, self.client_address)