Mercurial > cpython-lru_cache-weakref
diff Lib/http/server.py @ 63388:e2a9f633d612
#8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3).
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sat, 31 Jul 2010 21:54:24 +0000 |
| parents | f8ddfced2a34 |
| children | 7add45bcc9c6 |
line wrap: on
line diff
--- a/Lib/http/server.py Sat Jul 31 21:51:48 2010 +0000 +++ b/Lib/http/server.py Sat Jul 31 21:54:24 2010 +0000 @@ -1023,8 +1023,9 @@ 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
