diff --git a/datasette/views/table.py b/datasette/views/table.py index fa2c80deae..ba0dd4f34e 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -364,7 +364,7 @@ async def _validate_data(self, request, db, table_name, pks, upsert): 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()