Don't read the body if content_length is 0-like
This commit is contained in:
parent
b7ede0b27f
commit
a29633c846
@ -109,12 +109,16 @@ class RestProtocol(Protocol):
|
||||
request = context.request
|
||||
funcdef = context.funcdef
|
||||
|
||||
body = None
|
||||
if request.content_length not in (None, 0, '0'):
|
||||
body = request.body
|
||||
|
||||
args, kwargs = wsme.rest.args.combine_args(
|
||||
funcdef,
|
||||
wsme.rest.args.args_from_params(funcdef, request.params,
|
||||
context.inmime),
|
||||
wsme.rest.args.args_from_body(
|
||||
funcdef, request.body, request.content_type)
|
||||
funcdef, body, request.content_type)
|
||||
)
|
||||
assert len(args) == 0
|
||||
return kwargs
|
||||
|
Loading…
x
Reference in New Issue
Block a user