Rest protocols should now accept multipart/form-data posts (see issue #4)

This commit is contained in:
Christophe de Vienne 2012-08-23 23:25:21 +02:00
parent 3f3b0a08df
commit 2ec135137d

View File

@ -47,8 +47,10 @@ class RestProtocol(Protocol):
funcdef = context.funcdef
if 'Content-Type' in request.headers \
and "application/x-www-form-urlencoded" in \
request.headers['Content-Type']:
and ("application/x-www-form-urlencoded"
in request.headers['Content-Type']
or "multipart/form-data"
in request.headers['Content-Type']):
# The params were read from the body, ignoring the body then
pass
elif len(request.params) and request.content_length: