Skip to content

Commit

Permalink
Fixes for reference errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Feb 5, 2011
1 parent 9ec3490 commit 146b154
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

var http = require('http')
, https = require('https')
, url = require('url')
, util = require('util')
, stream = require('stream')
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 146b154

Please sign in to comment.