This repository was archived by the owner on Feb 5, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ var EventEmitter = require('events').EventEmitter,
11
11
// Try to keep connections open, and set a maximum number of connections per server
12
12
var AGENT_SETTINGS = { keepAlive : true , maxSockets : 5 } ;
13
13
var AGENTS = {
14
- ' http:' : new http . Agent ( AGENT_SETTINGS ) ,
15
- ' https:' : new https . Agent ( AGENT_SETTINGS ) ,
14
+ http : new http . Agent ( AGENT_SETTINGS ) ,
15
+ https : new https . Agent ( AGENT_SETTINGS ) ,
16
16
} ;
17
17
18
18
// Decode encoded streams with these decoders
@@ -27,7 +27,7 @@ function createRequest(settings) {
27
27
// Emit the response through a proxy
28
28
var request , requestProxy = new EventEmitter ( ) ,
29
29
requester = settings . protocol === 'http:' ? http : https ;
30
- settings . agent = AGENTS [ settings . protocol ] ;
30
+ settings . agents = AGENTS ;
31
31
request = requester . request ( settings , function ( response ) {
32
32
response = decode ( response ) ;
33
33
response . setEncoding ( 'utf8' ) ;
Original file line number Diff line number Diff line change 25
25
},
26
26
"dependencies" : {
27
27
"asynciterator" : " ^1.1.0" ,
28
- "follow-redirects" : " ^0.3 .0" ,
28
+ "follow-redirects" : " ^1.0 .0" ,
29
29
"lodash" : " ~2.4.1" ,
30
30
"lru-cache" : " ^4.0.1" ,
31
31
"minimist" : " ^1.2.0" ,
You can’t perform that action at this time.
0 commit comments