aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/response.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/response.py')
-rw-r--r--rest_framework/response.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/rest_framework/response.py b/rest_framework/response.py
index 0de01204..be78c43a 100644
--- a/rest_framework/response.py
+++ b/rest_framework/response.py
@@ -15,14 +15,17 @@ class Response(SimpleTemplateResponse):
Alters the init arguments slightly.
For example, drop 'template_name', and instead use 'data'.
- Setting 'renderer' and 'media_type' will typically be defered,
+ Setting 'renderer' and 'media_type' will typically be deferred,
For example being set automatically by the `APIView`.
"""
super(Response, self).__init__(None, status=status)
self.data = data
- self.headers = headers and headers[:] or []
self.template_name = template_name
self.exception = exception
+
+ if headers:
+ for name,value in headers.iteritems():
+ self[name] = value
@property
def rendered_content(self):