Comparing version 4.3.0 to 4.4.0
@@ -163,6 +163,7 @@ 'use strict'; | ||
internals.object(payload, this.result.contentType.mime, (err, result) => { | ||
this.object(payload, this.result.contentType.mime, (err, result) => { | ||
if (err) { | ||
this.result.payload = null; | ||
err.raw = payload; | ||
return next(err); | ||
@@ -247,3 +248,3 @@ } | ||
internals.object = function (payload, mime, next) { | ||
internals.Parser.prototype.object = function (payload, mime, next) { | ||
@@ -271,3 +272,4 @@ // Binary | ||
if (mime === 'application/x-www-form-urlencoded') { | ||
return next(null, payload.length ? Querystring.parse(payload.toString('utf8')) : {}); | ||
const parse = (this.settings.querystring || Querystring.parse); | ||
return next(null, payload.length ? parse(payload.toString('utf8')) : {}); | ||
} | ||
@@ -416,3 +418,3 @@ | ||
internals.object(payload, mime, (err, result) => annotate(err ? payload : result)); | ||
this.object(payload, mime, (err, result) => annotate(err ? payload : result)); | ||
}); | ||
@@ -446,3 +448,3 @@ } | ||
const path = Hoek.uniqueFilename(this.settings.uploads || Os.tmpDir()); | ||
const path = Hoek.uniqueFilename(this.settings.uploads || Os.tmpdir()); | ||
const file = Fs.createWriteStream(path, { flags: 'wx' }); | ||
@@ -449,0 +451,0 @@ const counter = new internals.Counter(); |
{ | ||
"name": "subtext", | ||
"description": "HTTP payload parsing", | ||
"version": "4.3.0", | ||
"version": "4.4.0", | ||
"repository": "git://github.com/hapijs/subtext", | ||
@@ -27,3 +27,3 @@ "main": "lib/index.js", | ||
"form-data": "2.1.x", | ||
"lab": "11.x.x" | ||
"lab": "13.x.x" | ||
}, | ||
@@ -30,0 +30,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16307
337