Commits

Robert Brewer  committed 493815f

Fix for #599 (Trouble with GZip and Etag (with enabled autotags)). Response.body was being set to [''], which doesn't evaluate to False.

  • Participants
  • Parent commits 3fcba1e

Comments (0)

Files changed (1)

File cherrypy/_cprequest.py

             # strings get wrapped in a list because iterating over a single
             # item list is much faster than iterating over every character
             # in a long string.
-            value = [value]
+            if value:
+                value = [value]
+            else:
+                # [''] doesn't evaluate to False, so replace it with [].
+                value = []
         elif isinstance(value, types.FileType):
             value = file_generator(value)
         elif value is None: