This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update environ for CGIHTTPServer.py
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: brett.cannon, gvanrossum, rhettinger
Priority: normal Keywords: patch

Created on 2002-08-16 04:26 by brett.cannon, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
diff brett.cannon, 2002-08-16 04:26 Contextual diff for CGIHTTPServer.py
Messages (3)
msg40959 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2002-08-16 04:26
This patch causes CGIHTTPServer to update os.environ
regardless of how it tries to handle calls (fork,
popen*, etc.).

I discovered this when trying to run Quixote through
CGIHTTPServer and getting errors reported by Quixote
saying that the SCRIPT_NAME environment variable was
not being updated.  I noticed that if self.has_fork was
true, then os.environ was never explicitly updated;
os.execve() has the env dict passed to it but I guess
that is not enough or OS X's os.execve() is broken.

So this patch just calls os.environ.update(env) after
the last change to the env dict but before the method
has decided how it is going to deal with the call.  It
also removes the now extraneous calls previously used.
msg40960 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-08-20 19:55
Logged In: YES 
user_id=6380

Thanks! Applied to Python 2.3 in CVS. Somebody can backport
this to 2.2.2.
msg40961 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-08-21 00:04
Logged In: YES 
user_id=80475

Backported to 2.2.2.
History
Date User Action Args
2022-04-10 16:05:36adminsetgithub: 37046
2002-08-16 04:26:11brett.cannoncreate