Open
Description
looks like there's an unnecessary charset check in lib/types/urlencoded.js
?
// assert charset
var charset = getCharset(req) || 'utf-8'
if (charset !== 'utf-8') {
debug('invalid charset')
next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
charset: charset
}))
return
}
that value is eventually passed to read
fn (defined in lib/read.js
) which can work with encodings other than utf-8 as long as they are supported by iconv
// assert charset is supported
if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
charset: encoding.toLowerCase()
}))
}