diff options
author | Guido van Rossum <guido@python.org> | 2004-03-20 22:18:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2004-03-20 22:18:03 (GMT) |
commit | 70ec0b42b581014f5c8c9092720a26a1988ce0e9 (patch) | |
tree | 0d340deb7df84fb9fc682414c840c3f221053c12 /Lib/CGIHTTPServer.py | |
parent | 27f49610afe5ca8fdce780490ec22def39bbbe3c (diff) | |
download | cpython-70ec0b42b581014f5c8c9092720a26a1988ce0e9.zip cpython-70ec0b42b581014f5c8c9092720a26a1988ce0e9.tar.gz cpython-70ec0b42b581014f5c8c9092720a26a1988ce0e9.tar.bz2 |
Fix for SF 777848.
I've been bitten by this myself in the past half year.
I hope this fix is right.
I'll backport this to 2.3.
Diffstat (limited to 'Lib/CGIHTTPServer.py')
-rw-r--r-- | Lib/CGIHTTPServer.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py index 9e118b2..f7b7722 100644 --- a/Lib/CGIHTTPServer.py +++ b/Lib/CGIHTTPServer.py @@ -177,12 +177,11 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): if co: env['HTTP_COOKIE'] = ', '.join(co) # XXX Other HTTP_* headers - if not self.have_fork: - # Since we're setting the env in the parent, provide empty - # values to override previously set values - for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH', - 'HTTP_USER_AGENT', 'HTTP_COOKIE'): - env.setdefault(k, "") + # Since we're setting the env in the parent, provide empty + # values to override previously set values + for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH', + 'HTTP_USER_AGENT', 'HTTP_COOKIE'): + env.setdefault(k, "") os.environ.update(env) self.send_response(200, "Script output follows") |