From 77ae87d3673f0f14994c269345abc04990778912 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 15 Feb 2011 10:13:09 -0800 Subject: [PATCH] default to port 80 for http.request --- lib/http.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/http.js b/lib/http.js index 91a71808fb..c806424d4e 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1086,7 +1086,7 @@ exports._connectionListener = connectionListener; function Agent(options) { this.options = options; this.host = options.host; - this.port = options.port; + this.port = options.port || 80; this.queue = []; this.sockets = []; @@ -1356,6 +1356,7 @@ var agents = {}; function getAgent(host, port) { + port = port || 80; var id = host + ':' + port; var agent = agents[id];