Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for content type being included twice #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ElementalWarrior
Copy link

Chrome appears to be providing content type twice sometimes, this results in load_json_body not being called.

Content-Type: application/json, application/json; charset=utf-8

Chrome appears to be providing content type twice sometimes, this results in
load_json_body not being called.

    Content-Type: application/json, application/json; charset=utf-8
@kiendang
Copy link
Collaborator

kiendang commented Aug 3, 2023

Could you elaborate on how did you encounter this issue? We encountered a similar issue with graphene-django earlier graphql-python/graphene-django#1404. Not sure if the two issues are related but would be nice to know the root cause of this if possible.

@ElementalWarrior
Copy link
Author

Could you elaborate on how did you encounter this issue? We encountered a similar issue with graphene-django earlier graphql-python/graphene-django#1404. Not sure if the two issues are related but would be nice to know the root cause of this if possible.

Our FE code requested with headers Content-Type and separately content-type.

Chrome combines and sends as one.

@kiendang
Copy link
Collaborator

kiendang commented Aug 4, 2023

Our FE code requested with headers Content-Type and separately content-type.

Chrome combines and sends as one.

This was exactly the issue we had too. We fixed the code in graphene-django to include only content-type.

I think in this case the best solution if possible is changing the front end code to specify only content-type (preferably lowercase) but since you submitted this PR I guess that's difficult?

Right now I'm reluctant to accept this PR. The spec for media types in content-type clearly allows only 1 set of type/subtype so this change would go against the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants