Description

With a response like

def gen():
yield "something"
return HttpResponse(gen())

and a HTTP 200 status code, the GzipMiddleware will always return an empty response because it accesses the response.content property twice. That means the _get_content getter applies ''.join twice to the generator, but a generator can only be iterated once.