summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keystone/server/flask/request_processing/json_body.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystone/server/flask/request_processing/json_body.py b/keystone/server/flask/request_processing/json_body.py
index 9fd5f65f7..cce0763d3 100644
--- a/keystone/server/flask/request_processing/json_body.py
+++ b/keystone/server/flask/request_processing/json_body.py
@@ -38,7 +38,7 @@ def json_body_before_request():
# Explicitly check if the content is supposed to be json.
if (flask.request.is_json
- or flask.request.headers['Content-Type'] == ''):
+ or flask.request.headers.get('Content-Type', '') == ''):
json_decoded = flask.request.get_json(force=True)
if not isinstance(json_decoded, dict):
# In the case that the returned value was not a dict, force