diff options
author | Iva Kaneva <iva@powertofly.com> | 2018-03-19 19:31:08 +0200 |
---|---|---|
committer | Ashley Camba Garrido <ashwoods@gmail.com> | 2018-03-27 07:21:01 +0200 |
commit | 6e369bde90133a919c573d9826d9d6a8dac8a240 (patch) | |
tree | 2ce8d14bf4d1789d1ea56e7f90305cbf42feb87b | |
parent | dad68e86a6008588a6094af011c225a69fc98ee4 (diff) | |
download | raven-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.py | 2 |
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 |