mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 21:44:04 +03:00
Added content-length to responses for chrome
Signed-off-by: Jens Alm <jens.alm@mac.com>
This commit is contained in:
parent
b6913c516b
commit
d0cf539dd6
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user