Revert "Fixed "Invalid argument to getAgent" when proxying HTTP"

This reverts commit 642e15805dbd572835bb4fee9527e4f2da658833.
This commit is contained in:
indexzero 2011-05-10 15:29:03 -07:00
parent 57127a3671
commit 40dc9dee2d

View File

@ -45,8 +45,10 @@ exports.version = [0, 5, 0];
// and sets the `maxSockets` property appropriately. // and sets the `maxSockets` property appropriately.
// //
function _getAgent (host, port, secure) { function _getAgent (host, port, secure) {
var options = { host: host, port: port }; var agent = !secure ? http.getAgent(host, port) : https.getAgent({
var agent = !secure ? http.getAgent(options) : https.getAgent(options); host: host,
port: port
});
agent.maxSockets = maxSockets; agent.maxSockets = maxSockets;
return agent; return agent;