Socket
Socket
Sign inDemoInstall

node-fetch

Package Overview
Dependencies
4
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.1 to 1.5.2

8

CHANGELOG.md

@@ -8,7 +8,11 @@

## v1.5.1 (master)
## v1.5.2 (master)
- Fix: allow node.js core to handle keep-alive connection pool when passing a custom agent
## v1.5.1
- Fix: redirect mode `manual` should work even when there is no redirection or broken redirection
## v1.5.0 (master)
## v1.5.0

@@ -15,0 +19,0 @@ - Enhance: rejected promise now use custom `Error` (thx to @pekeler)

@@ -77,3 +77,3 @@

if (!headers.has('connection')) {
if (!headers.has('connection') && !options.agent) {
headers.set('connection', 'close');

@@ -80,0 +80,0 @@ }

@@ -59,3 +59,3 @@

this.counter = init.counter || input.counter || input.follow || 0;
this.agent = init.agent || input.agent || input.agent;
this.agent = init.agent || input.agent;

@@ -62,0 +62,0 @@ Body.call(this, init.body || this._clone(input), {

{
"name": "node-fetch",
"version": "1.5.1",
"version": "1.5.2",
"description": "A light-weight module that brings window.fetch to node.js and io.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,2 +18,5 @@

});
this.server.on('connection', function(socket) {
socket.setTimeout(1500);
});
}

@@ -20,0 +23,0 @@

@@ -953,2 +953,16 @@

it('should send request with connection keep-alive if agent is provided', function() {
url = base + '/inspect';
opts = {
agent: new http.Agent({
keepAlive: true
})
};
return fetch(url, opts).then(function(res) {
return res.json();
}).then(function(res) {
expect(res.headers['connection']).to.equal('keep-alive');
});
});
it('should ignore unsupported attributes while reading headers', function() {

@@ -955,0 +969,0 @@ var FakeHeader = function() {};

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc