agentkeepalive
Advanced tools
Comparing version 2.0.4 to 2.0.5
2.0.5 / 2016-03-16 | ||
================== | ||
* fix: pick _evictSession to httpsAgent | ||
2.0.4 / 2016-03-13 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -1,1 +0,2 @@ | ||
module.exports = require('./lib/agent'); | ||
module.exports = require('./lib/agent'); | ||
module.exports.HttpsAgent = require('./lib/https_agent'); |
@@ -29,13 +29,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
var EventEmitter = require('events').EventEmitter; | ||
var debug; | ||
var node10 = process.version.indexOf('v0.10.') === 0; | ||
if (node10) { | ||
debug = function () { | ||
if (process.env.NODE_DEBUG && /agentkeepalive/.test(process.env.NODE_DEBUG)) { | ||
console.log.apply(console.log, arguments); | ||
} | ||
}; | ||
} else { | ||
debug = util.debuglog('agentkeepalive'); | ||
} | ||
var debug = require('./utils').debug; | ||
@@ -42,0 +32,0 @@ // New Agent code. |
@@ -13,3 +13,3 @@ /** | ||
"use strict"; | ||
'use strict'; | ||
@@ -20,19 +20,7 @@ /** | ||
var util = require('util'); | ||
var https = require('https'); | ||
var debug; | ||
var utils = require('./utils'); | ||
var OriginalAgent = require('./_http_agent').Agent; | ||
var OriginalHttpsAgent = https.Agent; | ||
var node10 = process.version.indexOf('v0.10.') === 0; | ||
if (node10) { | ||
debug = function () { | ||
if (process.env.NODE_DEBUG && /agentkeepalive/.test(process.env.NODE_DEBUG)) { | ||
console.log.apply(console.log, arguments); | ||
} | ||
}; | ||
} else { | ||
debug = util.debuglog('agentkeepalive'); | ||
} | ||
module.exports = Agent; | ||
@@ -79,3 +67,3 @@ | ||
util.inherits(Agent, OriginalAgent); | ||
utils.inherits(Agent, OriginalAgent); | ||
@@ -113,48 +101,1 @@ Agent.prototype.createSocket = function (req, options) { | ||
} | ||
function HttpsAgent(options) { | ||
Agent.call(this, options); | ||
this.defaultPort = 443; | ||
this.protocol = 'https:'; | ||
} | ||
util.inherits(HttpsAgent, Agent); | ||
if (node10) { | ||
HttpsAgent.prototype.createConnection = https.globalAgent.createConnection; | ||
HttpsAgent.prototype.getName = function(options) { | ||
var name = Agent.prototype.getName.call(this, options); | ||
name += ':'; | ||
if (options.ca) | ||
name += options.ca; | ||
name += ':'; | ||
if (options.cert) | ||
name += options.cert; | ||
name += ':'; | ||
if (options.ciphers) | ||
name += options.ciphers; | ||
name += ':'; | ||
if (options.key) | ||
name += options.key; | ||
name += ':'; | ||
if (options.pfx) | ||
name += options.pfx; | ||
name += ':'; | ||
if (options.rejectUnauthorized !== undefined) | ||
name += options.rejectUnauthorized; | ||
return name; | ||
}; | ||
} else { | ||
HttpsAgent.prototype.createConnection = OriginalHttpsAgent.prototype.createConnection; | ||
HttpsAgent.prototype.getName = OriginalHttpsAgent.prototype.getName; | ||
} | ||
Agent.HttpsAgent = HttpsAgent; |
{ | ||
"name": "agentkeepalive", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Missing keepalive http.Agent", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26629
8
471
2
3