New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

http-request

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-request - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## v0.6.1
* Fixed the typo in content-length for Buffer reqBody.
## v0.6.0

@@ -2,0 +5,0 @@ * Client rewritten almost from scratch for including broader HTTP support. Renamed to http-request to indicate this change. New HTTP method wrappers: DELETE, POST, PUT.

2

lib/request.js

@@ -260,3 +260,3 @@ 'use strict';

if (this.options.reqBody instanceof Buffer) {
this.options.headers['content-lenght'] = this.options.reqBody.length;
this.options.headers['content-length'] = this.options.reqBody.length;
}

@@ -263,0 +263,0 @@

{
"name": "http-request",
"version": "0.6.0",
"version": "0.6.1",
"main": "./lib/main.js",

@@ -5,0 +5,0 @@ "description": "General purpose HTTP / HTTPS client for node.js. Supports transparent gzip / deflate decoding.",

@@ -394,3 +394,4 @@ 'use strict';

headers = {
'x-content-type': req.headers['content-type']
'x-content-type': req.headers['content-type'],
'x-content-length': req.headers['content-length']
};

@@ -397,0 +398,0 @@

@@ -33,2 +33,3 @@ 'use strict';

assert.strictEqual(res.headers['x-content-type'], 'application/x-www-form-urlencoded;charset=utf-8', 'we got back the original content-type header');
assert.strictEqual(res.headers['x-content-length'], '21', 'we got back the content-length header');

@@ -60,2 +61,3 @@ done();

assert.strictEqual(res.headers['x-content-type'], 'application/x-www-form-urlencoded', 'we got back the original content-type header');
assert.strictEqual(res.headers['x-content-length'], '21', 'we got back the content-length header');

@@ -88,2 +90,3 @@ done();

assert.strictEqual(res.buffer.toString(), 'foo=bar&baz=q%20u%20x', 'we got back the parsed request body');
assert.strictEqual(res.headers['x-content-length'], '266', 'we got back the content-length header');

@@ -90,0 +93,0 @@ done();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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