strongloop / strong-remoting

Communicate between objects in servers, mobile apps, and other servers.
www.strongloop.com
Other
105 stars 93 forks source link

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

Closed ebourmalo closed 8 years ago

ebourmalo commented 8 years ago

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: https://github.com/strongloop/strong-remoting/pull/266

STRML commented 8 years ago

Never mind, I see this is different than #264 - good patch, :+1:.