From 340be42797e87fcc11859a771200075e7fe0c5f1 Mon Sep 17 00:00:00 2001 From: indexzero Date: Sun, 28 Aug 2011 05:28:57 -0400 Subject: [PATCH] [minor] Dont use `.bind()` --- lib/node-http-proxy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index ccbd80b1a..561dad004 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -103,11 +103,11 @@ exports.createServer = function () { proxy = new HttpProxy(options); handler = callback ? function (req, res) { callback(req, res, proxy) } - : proxy.proxyRequest; + : function (req, res) { proxy.proxyRequest(req, res) }; server = options.https - ? https.createServer(options.https, handler.bind(proxy)) - : http.createServer(handler.bind(proxy)); + ? https.createServer(options.https, handler) + : http.createServer(handler); //server.on('close', function () { // proxy.close();