koa-body-parser
Advanced tools
Comparing version 0.2.0 to 0.2.1
11
index.js
@@ -71,3 +71,2 @@ var getRawBody = require('raw-body') | ||
var req = this.req | ||
var stream = req | ||
@@ -81,3 +80,3 @@ if (decoder) { | ||
var cleanup = function () { | ||
req = stream = decoder = null | ||
req = decoder = null | ||
req.removeListener('end', cleanup) | ||
@@ -91,9 +90,9 @@ req.removeListener('error', cleanup) | ||
req.once('end', cleanup) | ||
stream = req.pipe(decoder) | ||
} | ||
return yield getRawBody(stream, { | ||
return yield getRawBody(decoder | ||
? req.pipe(decoder) | ||
: req, { | ||
limit: lim || limit, | ||
expected: !decoder && this.length | ||
length: !decoder && this.length | ||
}) | ||
@@ -100,0 +99,0 @@ } |
{ | ||
"name": "koa-body-parser", | ||
"description": "Request body parser for koa", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Jonathan Ong", |
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
7284