multiparty
Advanced tools
Comparing version 3.2.8 to 3.2.9
@@ -0,1 +1,6 @@ | ||
### 3.2.9 | ||
* Fix attaching error listeners directly after form.parse | ||
* Fix to not synchronously invoke callback to form.parse on error | ||
### 3.2.8 | ||
@@ -2,0 +7,0 @@ |
12
index.js
@@ -137,3 +137,3 @@ exports.Form = Form; | ||
// if an encoding is set, input is likely corrupted | ||
handleError(new Error('request encoding must not be set')); | ||
validationError(new Error('request encoding must not be set')); | ||
return; | ||
@@ -144,3 +144,3 @@ } | ||
if (!contentType) { | ||
handleError(new Error('missing content-type header')); | ||
validationError(new Error('missing content-type header')); | ||
return; | ||
@@ -151,3 +151,3 @@ } | ||
if (!m) { | ||
handleError(new Error('unrecognized content-type: ' + contentType)); | ||
validationError(new Error('unrecognized content-type: ' + contentType)); | ||
return; | ||
@@ -165,3 +165,3 @@ } | ||
if (!boundary) { | ||
handleError(new Error('content-type missing boundary: ' + require('util').inspect(m))); | ||
validationError(new Error('content-type missing boundary: ' + require('util').inspect(m))); | ||
return; | ||
@@ -201,2 +201,6 @@ } | ||
function validationError(err) { | ||
// handle error on next tick for event listeners to attach | ||
process.nextTick(handleError.bind(null, err)) | ||
} | ||
}; | ||
@@ -203,0 +207,0 @@ |
{ | ||
"name": "multiparty", | ||
"version": "3.2.8", | ||
"version": "3.2.9", | ||
"description": "multipart/form-data parser which supports streaming", | ||
@@ -5,0 +5,0 @@ "repository": { |
38838
616