From 0a30bcaea4af6f451d553f3d56519ccf7b6dd20a Mon Sep 17 00:00:00 2001 From: Amit Saha Date: Wed, 27 Jan 2016 15:47:41 +1100 Subject: [PATCH] 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;... --- graphql_flask/graphqlview.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/graphql_flask/graphqlview.py b/graphql_flask/graphqlview.py index d371466..a6ca5d9 100644 --- a/graphql_flask/graphqlview.py +++ b/graphql_flask/graphqlview.py @@ -172,4 +172,6 @@ def format_error(error): @staticmethod def get_content_type(request): - return request.content_type + # We use mimetype here since we don't need the other + # information provided by content_type + return request.mimetype