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

Commit 507192c

Browse files
committed
Use request.mimetype instead.
1 parent 8145f27 commit 507192c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

raven/contrib/flask.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,12 @@ def get_user_info(self, request):
171171

172172
def get_http_info(self, request):
173173
"""
174-
Redirect HTTP info to get data from request.data instead.
174+
Determine how to retrieve actual data by using request.mimetype.
175175
"""
176-
headers = dict(get_headers(request.environ))
177176

178177
retriever = self.get_form_data
179178

180-
if self.is_json_type(headers['Content-Type']):
179+
if self.is_json_type(request.mimetype):
181180
retriever = self.get_json_data
182181

183182
return self.get_http_info_with_retriever(request, retriever)

0 commit comments

Comments
 (0)