Comparing version 0.1.23 to 0.1.24
@@ -44,2 +44,10 @@ "use strict"; | ||
parse: function BodyParser_parse() { | ||
if ( | ||
(typeof this.type !== "string") || | ||
(typeof this.body !== "string") | ||
) { | ||
throw new error.HttpError(500, {type: this.type, body: this.body}, "Unsupported body type"); | ||
} | ||
if (this.type.indexOf('multipart/form-data') > -1) { | ||
@@ -72,3 +80,3 @@ this.parsedBody = this.parseBoundary(this.body, this.type.replace(/^.*boundary=/, '')); | ||
} else { | ||
throw new error.HttpError(500, {type: this.type, body: this.body}, "Unsupported form type"); | ||
throw new error.HttpError(500, {type: this.type, body: this.body}, "Unsupported body type"); | ||
} | ||
@@ -217,2 +225,2 @@ }, | ||
module.exports = BodyParser; | ||
module.exports = BodyParser; |
@@ -5,3 +5,3 @@ { | ||
"description": "Powerful lightweight mvc framework for nodejs", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "mongoose": "4.1.x", |
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
161351
5157