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

agentkeepalive

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agentkeepalive - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

8

History.md
1.2.1 / 2015-03-23
==================
* patch from iojs: don't overwrite servername option
* patch commits from joyent/node
* add max sockets test case
* add nagle algorithm delayed link
1.2.0 / 2014-09-02

@@ -3,0 +11,0 @@ ==================

37

lib/_http_agent.js

@@ -24,2 +24,4 @@ // Copyright Joyent, Inc. and other Node contributors.

'use strict';
var net = require('net');

@@ -197,7 +199,9 @@ var util = require('util');

options.servername = options.host;
if (req) {
var hostHeader = req.getHeader('host');
if (hostHeader) {
options.servername = hostHeader.replace(/:.*$/, '');
if (!options.servername) {
options.servername = options.host;
if (req) {
var hostHeader = req.getHeader('host');
if (hostHeader) {
options.servername = hostHeader.replace(/:.*$/, '');
}
}

@@ -266,3 +270,4 @@ }

sets.forEach(function(sockets) {
for (var sk = 0; sk < sets.length; sk++) {
var sockets = sets[sk];
if (sockets[name]) {

@@ -277,3 +282,4 @@ var index = sockets[name].indexOf(s);

}
});
}
if (this.requests[name] && this.requests[name].length) {

@@ -289,11 +295,14 @@ debug('removeSocket, have a request, make a socket');

var sets = [this.freeSockets, this.sockets];
sets.forEach(function(set) {
Object.keys(set).forEach(function(name) {
set[name].forEach(function(socket) {
socket.destroy();
});
});
});
for (var s = 0; s < sets.length; s++) {
var set = sets[s];
var keys = Object.keys(set);
for (var v = 0; v < keys.length; v++) {
var setName = set[keys[v]];
for (var n = 0; n < setName.length; n++) {
setName[n].destroy();
}
}
}
};
exports.globalAgent = new Agent();

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

// Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/
// http://fengmk2.cnpmjs.org/benchmark/nagle-algorithm-delayed-ack-mock.html
socket.setNoDelay(true);

@@ -70,0 +71,0 @@ }

{
"name": "agentkeepalive",
"version": "1.2.0",
"version": "1.2.1",
"description": "Missing keepalive http.Agent",
"main": "index.js",
"files": [
"index.js", "lib/"
],
"scripts": {

@@ -7,0 +10,0 @@ "test": "mocha -R spec -t 5000 -r should-http test/*.test.js",

@@ -26,6 +26,6 @@ # agentkeepalive

The nodejs's missing `keep alive` `http.Agent`. Support `http` and `https`.
The Node.js's missing `keep alive` `http.Agent`. Support `http` and `https`.
* `node >= 0.11.0`: use agentkeepalive@1.2.0+
* `node < 0.11.0`: use agentkeepalive@0.2.2
* `node >= 0.11.0`, `iojs >= 1.0.0`: use agentkeepalive@>=1.2.0
* `node = 0.10.x`: use agentkeepalive@0.2.x

@@ -202,3 +202,3 @@ ## Install

Copyright (c) 2012 - 2014 fengmk2 <fengmk2@gmail.com>;
Copyright (c) 2012 - 2015 fengmk2 <fengmk2@gmail.com>;

@@ -205,0 +205,0 @@ Permission is hereby granted, free of charge, to any person obtaining

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