BugFix: if no Content-Type header is present, read_arguments would fail
This commit is contained in:
parent
96ccea60f1
commit
f4884b3480
@ -36,8 +36,9 @@ class RestProtocol(object):
|
||||
request = context.request
|
||||
funcdef = context.funcdef
|
||||
|
||||
if "application/x-www-form-urlencoded" in \
|
||||
request.headers['Content-Type']:
|
||||
if 'Content-Type' in request.headers \
|
||||
and "application/x-www-form-urlencoded" in \
|
||||
request.headers['Content-Type']:
|
||||
# The params were read from the body, ignoring the body then
|
||||
pass
|
||||
elif len(request.params) and request.body:
|
||||
|
Loading…
x
Reference in New Issue
Block a user