Address bug #695157 by using a blank request class and setting an empty request path.
This commit is contained in:
parent
675ca7c5f3
commit
8ee15b6e93
@ -270,7 +270,7 @@ class Serializer(object):
|
|||||||
needed to serialize a dictionary to that type.
|
needed to serialize a dictionary to that type.
|
||||||
"""
|
"""
|
||||||
self.metadata = metadata or {}
|
self.metadata = metadata or {}
|
||||||
req = webob.Request(environ)
|
req = webob.Request.blank('', environ)
|
||||||
suffix = req.path_info.split('.')[-1].lower()
|
suffix = req.path_info.split('.')[-1].lower()
|
||||||
if suffix == 'json':
|
if suffix == 'json':
|
||||||
self.handler = self._to_json
|
self.handler = self._to_json
|
||||||
|
Loading…
Reference in New Issue
Block a user