mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Revert "Fixed "Invalid argument to getAgent" when proxying HTTP"
This reverts commit 642e15805dbd572835bb4fee9527e4f2da658833.
This commit is contained in:
parent
57127a3671
commit
40dc9dee2d
@ -45,9 +45,11 @@ exports.version = [0, 5, 0];
|
||||
// and sets the `maxSockets` property appropriately.
|
||||
//
|
||||
function _getAgent (host, port, secure) {
|
||||
var options = { host: host, port: port };
|
||||
var agent = !secure ? http.getAgent(options) : https.getAgent(options);
|
||||
|
||||
var agent = !secure ? http.getAgent(host, port) : https.getAgent({
|
||||
host: host,
|
||||
port: port
|
||||
});
|
||||
|
||||
agent.maxSockets = maxSockets;
|
||||
return agent;
|
||||
}
|
||||
@ -666,4 +668,4 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
|
||||
if (options.buffer && !errState) {
|
||||
options.buffer.resume();
|
||||
}
|
||||
};
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user