﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20472	response.content should be bytes on both Python 2 and 3	Łukasz Langa	Łukasz Langa	"{{{conditional_content_removal()}}} currently overwrites {{{response.content}}} to a native empty string which causes the following error when using both {{{ConditionalGetMiddleware}}} and {{{GZipMiddleware}}} on Python 3:

{{{
Traceback (most recent call last):
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/wsgiref/handlers.py"", line 138, in run
    self.finish_response()
  File ""/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/wsgiref/handlers.py"", line 178, in finish_response
    for data in self.result:
  File ""/Users/ambv/Documents/Projekty/Python/django/django/http/response.py"", line 288, in __next__
    return self.make_bytes(next(self._iterator))
  File ""/Users/ambv/Documents/Projekty/Python/django/django/http/response.py"", line 270, in make_bytes
    return bytes(value)
TypeError: string argument without an encoding
}}}

Patch: https://github.com/django/django/pull/1191

Tested on both Python 3.3 and 2.7."	Bug	closed	HTTP handling	1.5	Normal	fixed			Unreviewed	1	0	0	0	0	0
