From 146b154a1a31ae7a30aa9f28e891e4824af548fa Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Fri, 4 Feb 2011 20:32:10 -0800 Subject: [PATCH] Fixes for reference errors. --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index bef531105..6e9b9e472 100644 --- a/main.js +++ b/main.js @@ -13,6 +13,7 @@ // limitations under the License. var http = require('http') + , https = require('https') , url = require('url') , util = require('util') , stream = require('stream') @@ -159,7 +160,8 @@ Request.prototype.request = function () { } } - options.httpModule = {http:http, https:https}[options.proxy ? options.proxy.prototocl : options.uri.protocol] + options.httpModule = + {"http:":http, "https:":https}[options.proxy ? options.proxy.protocol : options.uri.protocol] if (!options.httpModule) throw new Error("Invalid protocol"); options.agent = options.getAgent(options.host, options.port);