Skip to content

Commit

Permalink
[minor] Dont use .bind()
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Aug 28, 2011
1 parent daf9231 commit 340be42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/node-http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 340be42

Please sign in to comment.