respect request charset
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
This commit is contained in:
parent
017117778e
commit
41952d2b25
1 changed files with 7 additions and 1 deletions
|
|
@ -73,7 +73,13 @@ class Request(RequestBase):
|
|||
if __debug__:
|
||||
_assert_have_json()
|
||||
if self.mimetype == 'application/json':
|
||||
return json.loads(self.data)
|
||||
request_charset = self.mimetype_params.get('charset')
|
||||
if request_charset is not None:
|
||||
j = json.loads(self.data, encoding=request_charset )
|
||||
else:
|
||||
j = json.loads(self.data)
|
||||
|
||||
return j
|
||||
|
||||
|
||||
class Response(ResponseBase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue