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 bug parsing content type headers #503

Merged
merged 1 commit into from
Jul 19, 2021
Merged

Fix bug parsing content type headers #503

merged 1 commit into from
Jul 19, 2021

Conversation

lbalmaceda
Copy link
Contributor

Changes

The function that was parsing the Content-Type header was not ignoring the case. This caused some endpoints to fail to be processed as JSON content. This PR fixes that by converting the keys to lowercase before making the "contains" assertion.

References

See RFC, section 4.2: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. Since this library has unit testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage

  • This change adds integration test coverage

  • This change has been tested on the latest version of the platform/language or why not

Checklist

@lbalmaceda lbalmaceda requested a review from a team as a code owner July 19, 2021 14:47
@lbalmaceda lbalmaceda added this to the v2-Next milestone Jul 19, 2021
@evansims
Copy link
Member

LGTM 👍

@lbalmaceda lbalmaceda merged commit 5407445 into main Jul 19, 2021
@lbalmaceda lbalmaceda modified the milestones: v2-Next, 2.4.0 Jul 20, 2021
@poovamraj poovamraj deleted the fix-json-header branch July 18, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants