Move the check for an empty body up.
So if you have a client that always sets the Accept json but you are doing a GET and the body is empty, then we get an exception.
This commit is contained in:
parent
2277370fca
commit
ab68986efc
@ -149,12 +149,12 @@ def args_from_body(funcdef, body, mimetype):
|
||||
else:
|
||||
datatypes = dict(((a.name, a.datatype) for a in funcdef.arguments))
|
||||
|
||||
if not body:
|
||||
return (), {}
|
||||
if mimetype in restjson.accept_content_types:
|
||||
dataformat = restjson
|
||||
elif mimetype in restxml.accept_content_types:
|
||||
dataformat = restxml
|
||||
elif not body:
|
||||
return (), {}
|
||||
else:
|
||||
raise ValueError("Unknow mimetype: %s" % mimetype)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user