Comparing version 4.1.0 to 4.2.0
4.2.0 / 2016-05-05 | ||
================== | ||
* test: test on node 4, 5, 6 | ||
* feat: Added support for request body inflation | ||
4.1.0 / 2016-05-05 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -7,2 +7,3 @@ | ||
var raw = require('raw-body'); | ||
var inflate = require('inflation'); | ||
var qs = require('qs'); | ||
@@ -28,3 +29,4 @@ | ||
var len = req.headers['content-length']; | ||
if (len) opts.length = ~~len; | ||
var encoding = req.headers['content-encoding'] || 'identity'; | ||
if (len && encoding === 'identity') opts.length = ~~len; | ||
opts.encoding = opts.encoding || 'utf8'; | ||
@@ -35,3 +37,3 @@ opts.limit = opts.limit || '56kb'; | ||
// raw-body returns a Promise when no callback is specified | ||
return raw(req, opts) | ||
return raw(inflate(req), opts) | ||
.then(function(str){ | ||
@@ -38,0 +40,0 @@ try { |
@@ -7,2 +7,3 @@ | ||
var raw = require('raw-body'); | ||
var inflate = require('inflation'); | ||
@@ -31,3 +32,4 @@ // Allowed whitespace is defined in RFC 7159 | ||
var len = req.headers['content-length']; | ||
if (len) opts.length = len = ~~len; | ||
var encoding = req.headers['content-encoding'] || 'identity'; | ||
if (len && encoding === 'identity') opts.length = len = ~~len; | ||
opts.encoding = opts.encoding || 'utf8'; | ||
@@ -38,3 +40,3 @@ opts.limit = opts.limit || '1mb'; | ||
// raw-body returns a promise when no callback is specified | ||
return raw(req, opts) | ||
return raw(inflate(req), opts) | ||
.then(function(str) { | ||
@@ -41,0 +43,0 @@ try { |
@@ -6,2 +6,3 @@ /** | ||
var raw = require('raw-body'); | ||
var inflate = require('inflation'); | ||
@@ -26,3 +27,4 @@ /** | ||
var len = req.headers['content-length']; | ||
if (len) opts.length = ~~len; | ||
var encoding = req.headers['content-encoding'] || 'identity'; | ||
if (len && encoding === 'identity') opts.length = ~~len; | ||
opts.encoding = opts.encoding || 'utf8'; | ||
@@ -32,3 +34,3 @@ opts.limit = opts.limit || '1mb'; | ||
// raw-body returns a Promise when no callback is specified | ||
return raw(req, opts); | ||
return raw(inflate(req), opts); | ||
}; |
{ | ||
"name": "co-body", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"repository": "cojs/co-body", | ||
@@ -18,2 +18,3 @@ "description": "request body parsing for co", | ||
"raw-body": "~2.1.2", | ||
"inflation": "~2.0.0", | ||
"type-is": "~1.6.6" | ||
@@ -20,0 +21,0 @@ }, |
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
9247
162
4
+ Addedinflation@~2.0.0
+ Addedinflation@2.0.0(transitive)