mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3).
This commit is contained in:
parent
78aa396415
commit
62e2ca2193
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue