You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When sending POST requests to the GraphQL Servlet with Content-Type: application/graphql it works as expected, when specifying a charset with Content-Type: application/grapql; charset=utf-8 it fails to recognize it and tries to handle it as a JSON body instead.
To Reproduce
Steps to reproduce the behavior:
Make any queryable GraphQL Servlet
Query it via POST with Content-Type: application/graphql; charset=utf-8
GraphQLPostInvocationInputParser fails to recognize Content-Type Header
Expected behavior GraphQLPostInvocationInputParser should be able to handle Content-Type Headers containing additional information like charset
Additional context
Currently checking for Content-Type: application/graphql in GraphQLPostInvocationInputParser happens like this:
if (APPLICATION_GRAPHQL.equals(request.getContentType())) {
I would expect something more like this:
StringcontentType = request.getContentType();
if (contentType != null && APPLICATION_GRAPHQL.equals(contentType.split(";")[0])) {
The text was updated successfully, but these errors were encountered:
Describe the bug
When sending POST requests to the GraphQL Servlet with
Content-Type: application/graphql
it works as expected, when specifying a charset withContent-Type: application/grapql; charset=utf-8
it fails to recognize it and tries to handle it as a JSON body instead.To Reproduce
Steps to reproduce the behavior:
Content-Type: application/graphql; charset=utf-8
GraphQLPostInvocationInputParser
fails to recognizeContent-Type
HeaderExpected behavior
GraphQLPostInvocationInputParser
should be able to handleContent-Type
Headers containing additional information like charsetAdditional context
Currently checking for
Content-Type: application/graphql
inGraphQLPostInvocationInputParser
happens like this:I would expect something more like this:
The text was updated successfully, but these errors were encountered: