BugFix: if no Content-Type header is present, read_arguments would fail

This commit is contained in:
Christophe de Vienne 2012-03-27 18:29:41 +02:00
parent 96ccea60f1
commit f4884b3480

View File

@ -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: