Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit a138924

Browse files
author
Iva Kaneva
committed
Recognize Content Type ending with +json as JSON type
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
1 parent ce252ca commit a138924

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

raven/contrib/flask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def get_http_info(self, request):
193193
return self.get_http_info_with_retriever(request, retriever)
194194

195195
def is_json_type(self, content_type):
196-
return content_type == 'application/json'
196+
return content_type == 'application/json' or content_type.endswith('+json')
197197

198198
def get_form_data(self, request):
199199
return request.form

0 commit comments

Comments
 (0)