summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIva Kaneva <iva@powertofly.com>2018-03-19 19:31:08 +0200
committerAshley Camba Garrido <ashwoods@gmail.com>2018-03-27 07:21:01 +0200
commit6e369bde90133a919c573d9826d9d6a8dac8a240 (patch)
tree2ce8d14bf4d1789d1ea56e7f90305cbf42feb87b
parentdad68e86a6008588a6094af011c225a69fc98ee4 (diff)
downloadraven-pr/1211.tar.gz
Recognize Content Type ending with `+json` as JSON typepr/1211
Sentry should recognize API JSON requests as JSON type not as Form. If they are recognized as Form the body payload appears empty in Sentry UI. RFC6839: https://tools.ietf.org/html/rfc6839#page-4
-rw-r--r--raven/contrib/flask.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/raven/contrib/flask.py b/raven/contrib/flask.py
index 40c7fb3..bfdec1e 100644
--- a/raven/contrib/flask.py
+++ b/raven/contrib/flask.py
@@ -193,7 +193,7 @@ class Sentry(object):
return self.get_http_info_with_retriever(request, retriever)
def is_json_type(self, content_type):
- return content_type == 'application/json'
+ return content_type == 'application/json' or content_type.endswith('+json')
def get_form_data(self, request):
return request.form