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 debe0a3 commit 96fada8Copy full SHA for 96fada8
lib/types/urlencoded.js
@@ -35,13 +35,15 @@ function urlencoded (options) {
35
36
var extended = Boolean(opts.extended)
37
var type = opts.type || 'application/x-www-form-urlencoded'
38
- var charset = opts.charset || 'utf-8'
39
40
var queryparse = opts.parser || createQueryParser(opts, extended)
41
42
return genericParser(opts, {
43
type: type,
44
- charset: charset,
+
+ charset: function validateCharset (charset) {
45
+ return charset === 'utf-8' || charset === 'iso-8859-1'
46
+ },
47
48
parse: function parse (body, encoding) {
49
return body.length
0 commit comments