Added content-length to responses for chrome

Signed-off-by: Jens Alm <jens.alm@mac.com>
This commit is contained in:
Jens Alm 2011-11-19 21:08:51 +01:00
parent b6913c516b
commit d0cf539dd6

View File

@ -264,6 +264,7 @@ class ResponseMixin(object):
resp = HttpResponse(content, mimetype=response.media_type, status=response.status) resp = HttpResponse(content, mimetype=response.media_type, status=response.status)
for (key, val) in response.headers.items(): for (key, val) in response.headers.items():
resp[key] = val resp[key] = val
resp['Content-Length'] = len(content)
return resp return resp