Socket
Socket
Sign inDemoInstall

body-parser

Package Overview
Dependencies
Maintainers
6
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

body-parser - npm Package Compare versions

Comparing version 1.6.4 to 1.6.5

5

HISTORY.md

@@ -0,1 +1,6 @@

1.6.5 / 2014-08-16
==================
* deps: on-finished@2.1.0
1.6.4 / 2014-08-14

@@ -2,0 +7,0 @@ ==================

29

lib/read.js

@@ -13,2 +13,3 @@ /*!

var iconv = require('iconv-lite')
var onFinished = require('on-finished')
var typer = require('media-typer')

@@ -37,3 +38,2 @@ var zlib = require('zlib')

var stream
var waitend = true

@@ -63,12 +63,12 @@ // flag as parsed

req.on('aborted', cleanup)
req.on('end', cleanup)
req.on('error', cleanup)
// read body
getBody(stream, options, function (err, body) {
if (err && waitend && req.readable) {
if (err) {
if (!err.status) {
err.status = 400
}
// read off entire request
req.resume()
req.once('end', function onEnd() {
stream.resume()
onFinished(req, function onfinished() {
next(err)

@@ -79,8 +79,2 @@ })

if (err) {
if (!err.status) err.status = 400
next(err)
return
}
// verify

@@ -110,9 +104,2 @@ if (verify) {

})
function cleanup() {
waitend = false
req.removeListener('aborted', cleanup)
req.removeListener('end', cleanup)
req.removeListener('error', cleanup)
}
}

@@ -119,0 +106,0 @@

{
"name": "body-parser",
"description": "Node.js body parsing middleware",
"version": "1.6.4",
"version": "1.6.5",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -16,2 +16,3 @@ "contributors": [

"media-typer": "0.2.0",
"on-finished": "2.1.0",
"qs": "1.2.2",

@@ -18,0 +19,0 @@ "raw-body": "1.3.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc