mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
less strict requirements to content-type=application/json (#2392)
This commit is contained in:
parent
e9d34a99b8
commit
cf4274f2a3
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ class TableInsertView(BaseView):
|
|||
def _errors(errors):
|
||||
return None, errors, {}
|
||||
|
||||
if request.headers.get("content-type") != "application/json":
|
||||
if not request.headers.get("content-type").startswith("application/json"):
|
||||
# TODO: handle form-encoded data
|
||||
return _errors(["Invalid content-type, must be application/json"])
|
||||
body = await request.post_body()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue