diff options
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index f6f788f..930831c 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -1015,8 +1015,9 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): if ua: env['HTTP_USER_AGENT'] = ua co = filter(None, self.headers.get_all('cookie', [])) - if co: - env['HTTP_COOKIE'] = ', '.join(co) + cookie_str = ', '.join(co) + if cookie_str: + env['HTTP_COOKIE'] = cookie_str # XXX Other HTTP_* headers # Since we're setting the env in the parent, provide empty # values to override previously set values |