This commit is contained in:
parent
5f7e60194f
commit
d58f406de4
@ -9,13 +9,25 @@ from moto.core.utils import camelcase_to_underscores, method_names_from_class
|
||||
class BaseResponse(object):
|
||||
|
||||
def dispatch(self, request, full_url, headers):
|
||||
querystring = None
|
||||
|
||||
if hasattr(request, 'body'):
|
||||
# Boto
|
||||
self.body = request.body
|
||||
else:
|
||||
# Flask server
|
||||
|
||||
# FIXME: At least in Flask==0.10.1, request.data is an empty string
|
||||
# and the information we want is in request.form. Keeping self.body
|
||||
# definition for back-compatibility
|
||||
self.body = request.data
|
||||
|
||||
querystring = {}
|
||||
for key, value in request.form.iteritems():
|
||||
querystring[key] = [value,]
|
||||
|
||||
|
||||
if querystring is None:
|
||||
querystring = parse_qs(urlparse(full_url).query)
|
||||
if not querystring:
|
||||
querystring = parse_qs(self.body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user