#8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3).
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 @@
         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