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,7 +36,8 @@ 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 \
and "application/x-www-form-urlencoded" in \
request.headers['Content-Type']: 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