Merge branch 'new-request-dispatching' into blueprints

This commit is contained in:
Armin Ronacher 2011-05-28 15:14:07 +02:00
commit 673fa18e6d
28 changed files with 689 additions and 266 deletions

View file

@ -81,7 +81,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):