From 15c18b612d6cd5a1f3ae46b5590dda1fc586fb35 Mon Sep 17 00:00:00 2001 From: Marak Squires Date: Mon, 2 Aug 2010 21:49:10 -0400 Subject: [PATCH] fixed additional port / server mismatches for new api --- lib/node-http-proxy.js | 5 ++--- test/node-http-proxy-test.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index ad59c2e..f2054ac 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -25,7 +25,6 @@ */ var sys = require('sys'), - eyes = require('eyes'), http = require('http'), events = require('events'); @@ -74,7 +73,7 @@ exports.HttpProxy.prototype = { callback(req, res, self); } else { - self.proxyRequest(server, port, req, res); + self.proxyRequest(port, server, req, res); } }); @@ -114,7 +113,7 @@ exports.HttpProxy.prototype = { delete this.events[req]; }, - proxyRequest: function (server, port, req, res) { + proxyRequest: function (port, server, req, res) { // Remark: nodeProxy.body exists solely for testability this.body = ''; var self = this; diff --git a/test/node-http-proxy-test.js b/test/node-http-proxy-test.js index dc7037e..13cedf9 100644 --- a/test/node-http-proxy-test.js +++ b/test/node-http-proxy-test.js @@ -46,7 +46,7 @@ var startProxyServer = function (port, server, proxy) { // // Creates the reverse proxy server with a specified latency // -var startLatentProxyServer = function (server, port, proxy, latency) { +var startLatentProxyServer = function (port, server, proxy, latency) { // Initialize the nodeProxy and start proxying the request var proxyServer = proxy.createServer(function (req, res, proxy) { setTimeout(function () {