Address bug #695157 by using a blank request class and setting an empty request path.

This commit is contained in:
Soren Hansen 2010-12-28 23:25:50 +01:00
parent 675ca7c5f3
commit 8ee15b6e93

View File

@ -270,7 +270,7 @@ class Serializer(object):
needed to serialize a dictionary to that type.
"""
self.metadata = metadata or {}
req = webob.Request(environ)
req = webob.Request.blank('', environ)
suffix = req.path_info.split('.')[-1].lower()
if suffix == 'json':
self.handler = self._to_json