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
|
request = context.request
|
||||||
funcdef = context.funcdef
|
funcdef = context.funcdef
|
||||||
|
|
||||||
if "application/x-www-form-urlencoded" in \
|
if 'Content-Type' in request.headers \
|
||||||
request.headers['Content-Type']:
|
and "application/x-www-form-urlencoded" in \
|
||||||
|
request.headers['Content-Type']:
|
||||||
# The params were read from the body, ignoring the body then
|
# The params were read from the body, ignoring the body then
|
||||||
pass
|
pass
|
||||||
elif len(request.params) and request.body:
|
elif len(request.params) and request.body:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user