We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96df60f commit bd702d2Copy full SHA for bd702d2
lib/types/json.js
@@ -122,7 +122,7 @@ function json (options) {
122
123
// assert charset per RFC 7159 sec 8.1
124
var charset = getCharset(req) || 'utf-8'
125
- if (charset.substr(0, 4) !== 'utf-') {
+ if (charset.slice(0, 4) !== 'utf-') {
126
debug('invalid charset')
127
next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
128
charset: charset,
0 commit comments