mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a9e1c19210
commit
3cd9bf2b04
@ -36,8 +36,10 @@ def cdb_run(ctx, rd, which, version):
|
|||||||
try:
|
try:
|
||||||
if MSGPACK_MIME in ct:
|
if MSGPACK_MIME in ct:
|
||||||
args = msgpack_loads(raw)
|
args = msgpack_loads(raw)
|
||||||
else:
|
elif 'application/json' in ct:
|
||||||
args = json_loads(raw)
|
args = json_loads(raw)
|
||||||
|
else:
|
||||||
|
raise HTTPBadRequest('Only JSON or msgpack requests are supported')
|
||||||
except Exception:
|
except Exception:
|
||||||
raise HTTPBadRequest('args are not valid encoded data')
|
raise HTTPBadRequest('args are not valid encoded data')
|
||||||
if getattr(m, 'needs_srv_ctx', False):
|
if getattr(m, 'needs_srv_ctx', False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user