aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/response.py
diff options
context:
space:
mode:
authorTom Christie2013-12-04 14:59:28 +0000
committerTom Christie2013-12-04 14:59:28 +0000
commit6446b44f01f06d7f5482798a16025ebcea75c024 (patch)
tree7edd3614a2a9b75d65ed05497a835302b5dcadc3 /rest_framework/response.py
parentde5b9e39dd4c21f4dcceb7cf13c7366b0fb74ec9 (diff)
parent04a43ddca565d96848c25a1d1879c9e7a53a7b6c (diff)
downloaddjango-rest-framework-6446b44f01f06d7f5482798a16025ebcea75c024.tar.bz2
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Diffstat (limited to 'rest_framework/response.py')
-rw-r--r--rest_framework/response.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/response.py b/rest_framework/response.py
index 5877c8a3..1dc6abcf 100644
--- a/rest_framework/response.py
+++ b/rest_framework/response.py
@@ -61,6 +61,10 @@ class Response(SimpleTemplateResponse):
assert charset, 'renderer returned unicode, and did not specify ' \
'a charset value.'
return bytes(ret.encode(charset))
+
+ if not ret:
+ del self['Content-Type']
+
return ret
@property