Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

raw-body

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raw-body - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

7

HISTORY.md

@@ -0,1 +1,8 @@

1.3.4 / 2015-04-15
==================
* Fix hanging callback if request aborts during read
* deps: iconv-lite@0.4.8
- Add encoding alias UNICODE-1-1-UTF-7
1.3.3 / 2015-02-08

@@ -2,0 +9,0 @@ ==================

@@ -89,2 +89,3 @@ var bytes = require('bytes')

stream.on('aborted', onAborted)
stream.on('data', onData)

@@ -102,2 +103,14 @@ stream.once('end', onEnd)

function onAborted() {
var err = makeError('request aborted', 'request.aborted')
err.code = 'ECONNABORTED'
err.status = 400
err.received = received
err.length = err.expected = length
cleanup()
halt(stream)
done(err)
}
function onData(chunk) {

@@ -145,2 +158,3 @@ received += chunk.length

stream.removeListener('aborted', onAborted)
stream.removeListener('data', onData)

@@ -147,0 +161,0 @@ stream.removeListener('end', onEnd)

10

package.json
{
"name": "raw-body",
"description": "Get and validate the raw body of a readable stream.",
"version": "1.3.3",
"version": "1.3.4",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -14,9 +14,9 @@ "contributors": [

"bytes": "1.0.0",
"iconv-lite": "0.4.7"
"iconv-lite": "0.4.8"
},
"devDependencies": {
"istanbul": "0.3.5",
"mocha": "~2.1.0",
"istanbul": "0.3.9",
"mocha": "~2.2.4",
"readable-stream": "~1.0.33",
"through2": "0.6.3"
"through2": "0.6.5"
},

@@ -23,0 +23,0 @@ "engines": {

# raw-body
[![NPM version][npm-image]][npm-url]
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

@@ -75,3 +73,3 @@ Gets the entire buffer of a stream either as a `Buffer` or a string.

- `status` and `statusCode` - the corresponding status code for the error
- `type` - either `entity.too.large`, `request.size.invalid`, `stream.encoding.set`, or `encoding.unsupported`
- `type` - either `entity.too.large`, `request.aborted`, `request.size.invalid`, `stream.encoding.set`, or `encoding.unsupported`

@@ -85,13 +83,13 @@ - `res` - the result, either as a `String` if an encoding was set or a `Buffer` otherwise.

[npm-image]: https://img.shields.io/npm/v/raw-body.svg?style=flat-square
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/raw-body.svg
[npm-url]: https://npmjs.org/package/raw-body
[travis-image]: https://img.shields.io/travis/stream-utils/raw-body.svg?style=flat-square
[travis-image]: https://img.shields.io/travis/stream-utils/raw-body/master.svg
[travis-url]: https://travis-ci.org/stream-utils/raw-body
[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body
[david-image]: http://img.shields.io/david/stream-utils/raw-body.svg?style=flat-square
[david-url]: https://david-dm.org/stream-utils/raw-body
[license-image]: http://img.shields.io/npm/l/raw-body.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/raw-body.svg?style=flat-square
[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg
[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master
[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg
[downloads-url]: https://npmjs.org/package/raw-body
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