[minor] Dont use .bind()

This commit is contained in:
indexzero 2011-08-28 05:28:57 -04:00
parent daf9231a66
commit 340be42797

View File

@ -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();