summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-31 21:54:24 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-31 21:54:24 (GMT)
commit62e2ca219311a111873892910ad441659faeaefa (patch)
tree74b217909164562274942fe2688f8fbc41c81fd6 /Lib/http
parent78aa3964156c97329ca514d1f38bd3fbc2eda8db (diff)
downloadcpython-62e2ca219311a111873892910ad441659faeaefa.zip
cpython-62e2ca219311a111873892910ad441659faeaefa.tar.gz
cpython-62e2ca219311a111873892910ad441659faeaefa.tar.bz2
#8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3).
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/server.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index d2a685f..098ad25 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -1023,8 +1023,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