Skip to content

Commit 0a30bca

Browse files
committed
Use request.mimetype instead of request.content_type
request.content_type has encoding and other information associated with it. If we send in multipart/form-data, the content_type attribute is not just the mime type which is what we are interested in here, but is a string of the form multipart/form-data;...
1 parent 3840761 commit 0a30bca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graphql_flask/graphqlview.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,6 @@ def format_error(error):
172172

173173
@staticmethod
174174
def get_content_type(request):
175-
return request.content_type
175+
# We use mimetype here since we don't need the other
176+
# information provided by content_type
177+
return request.mimetype

0 commit comments

Comments
 (0)