Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Naive Parsing of Content-Type HTTP header
It turns out checking for exactly "application/json" is a bad idea since some servers/web frameworks include stuff like encoding in the header. For example: Express.js since 4.16.x now set's the content-type header to: 'application/json; charset=utf-8'. To remedy this, we now check for the inclusion of application/json in the string, but don't attempt to match the exact value
- Loading branch information
1 parent
6de9010
commit 6b0646e
Showing
3 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters