This commit is contained in:
Kovid Goyal 2017-05-24 17:06:40 +05:30
parent a9e1c19210
commit 3cd9bf2b04
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -36,8 +36,10 @@ def cdb_run(ctx, rd, which, version):
try:
if MSGPACK_MIME in ct:
args = msgpack_loads(raw)
else:
elif 'application/json' in ct:
args = json_loads(raw)
else:
raise HTTPBadRequest('Only JSON or msgpack requests are supported')
except Exception:
raise HTTPBadRequest('args are not valid encoded data')
if getattr(m, 'needs_srv_ctx', False):