aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/request.py
diff options
context:
space:
mode:
authorTom Christie2013-10-24 05:45:55 -0700
committerTom Christie2013-10-24 05:45:55 -0700
commit0fc9d5fed927410b82bbbd0889f8d986cb8a9f77 (patch)
tree6efab410eb9f39243f4cba70ba1ff57741ba65ba /rest_framework/request.py
parent63023078856e78fa043df96378137fd7acc2c1de (diff)
parent6b3500b684a43fb67c42231859fa27cf5193298a (diff)
downloaddjango-rest-framework-0fc9d5fed927410b82bbbd0889f8d986cb8a9f77.tar.bz2
Merge pull request #1198 from alexanderlukanin13/form-post-unicode
Fixed UnicodeEncodeError when POST JSON via web interface; added test
Diffstat (limited to 'rest_framework/request.py')
-rw-r--r--rest_framework/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py
index 977d4d96..b883d0d4 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -334,7 +334,7 @@ class Request(object):
self._CONTENT_PARAM in self._data and
self._CONTENTTYPE_PARAM in self._data):
self._content_type = self._data[self._CONTENTTYPE_PARAM]
- self._stream = BytesIO(self._data[self._CONTENT_PARAM].encode(HTTP_HEADER_ENCODING))
+ self._stream = BytesIO(self._data[self._CONTENT_PARAM].encode(self.parser_context['encoding']))
self._data, self._files = (Empty, Empty)
def _parse(self):