open-api icon indicating copy to clipboard operation
open-api copied to clipboard

express-openapi media type mismatch due to charset directive

Open alextes opened this issue 5 years ago • 1 comments

For openapi 3.0.1 , sending a POST with a Content-Type header set to application/json; charset=utf-8 fails with a Request Body Object content property set to application/json due to the charset directive, resulting in a 415 response. I'm guessing a === string comparison is happening somewhere on the full header rather than just the media-type in the Content-Type header.

alextes avatar Apr 02 '19 07:04 alextes

@alextes please open a PR

jsdevel avatar Apr 02 '19 16:04 jsdevel