[Patches] [ python-Patches-796772 ] CGIHTTPServer fix
SourceForge.net
noreply at sourceforge.net
Sun Aug 31 08:48:11 EDT 2003
Patches item #796772, was opened at 2003-08-28 11:34
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=796772&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Nobody/Anonymous (nobody)
Summary: CGIHTTPServer fix
Initial Comment:
Here's a fix for the CGI server. The problem only
occurs on systems that support os.fork(). When you
invoke a CGI script with a query string and then
subsequent invoke it without a query string (or with an
empty query string), the second invocation gets passed
the query string of the first invocation. This is
because of the way os.environ is updated in the parent,
but when there is no query string, the old query string
doesn't get deleted. The solution is to update the
os.environ in the child.
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-08-31 09:48
Message:
Logged In: YES
user_id=80475
The first part of the patch makes sense to me.
The second part updates os.environ which is shared between
successive calls. I would have expected something like:
childenv = os.environ.copy()
childenv.update(env)
. . .
os.execve(scriptfile, args, childenv)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=796772&group_id=5470
More information about the Patches
mailing list