From d0cf539dd6c936989ac7ed203389e4ecd62e9e13 Mon Sep 17 00:00:00 2001 From: Jens Alm Date: Sat, 19 Nov 2011 21:08:51 +0100 Subject: [PATCH] Added content-length to responses for chrome Signed-off-by: Jens Alm --- djangorestframework/mixins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py index 8f8eb0183..2b3ced407 100644 --- a/djangorestframework/mixins.py +++ b/djangorestframework/mixins.py @@ -264,6 +264,7 @@ class ResponseMixin(object): resp = HttpResponse(content, mimetype=response.media_type, status=response.status) for (key, val) in response.headers.items(): resp[key] = val + resp['Content-Length'] = len(content) return resp