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

Application/json body request with an extended content-type header (charset) should not be coerced #267

Closed
ebourmalo opened this issue Dec 15, 2015 · 1 comment
Assignees
Labels

Comments

@ebourmalo
Copy link

The initial check to turn off the coercion of the request body when the header is application/json was:

ctx.req.get('content-type') === 'application/json'

If the content-type header is extended with the charset definition (i.e application/json;charset=UTF-8), the body is coerced and that is NOT what we want :)

Here is the PR for a fix, updating the check for allowing this use case: #266

@STRML
Copy link
Member

STRML commented Dec 16, 2015

Never mind, I see this is different than #264 - good patch, 👍.

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

No branches or pull requests

4 participants