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

fix(dgraph): Update alpha http handler to handle params in content-type header #6540

Closed
wants to merge 1 commit into from

Conversation

rahulgurnani
Copy link
Contributor

@rahulgurnani rahulgurnani commented Sep 21, 2020

This fixes #5174

Earlier, if we send "Content-Type" as "application/json; charset=utf8" query failed. The content-type http header allows params and our code didn't take those into account.
Docs for Content-Type header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type

Added dependency to gddo/httputil/header package which has a utility to parse the headers.
Also added a test for this change.


This change is Reviewable

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 1 rules errored during the review.

@parasssh
Copy link
Contributor

Branch has conflicts. Please merge and update your PR.
Also, should we be doing this across the entire code base? Seems it'd be good for any HTTP handler.

@rahulgurnani
Copy link
Contributor Author

#6370 already addresses this issue

@joshua-goldstein joshua-goldstein deleted the rahulgurnani/header_fixes branch August 18, 2022 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Graphql : Failing on wrong content-type message
2 participants