From 7c8ecc8ea85b59fc16b55b9a142372b6ac168b2a Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Tue, 10 Sep 2013 23:41:09 +0100 Subject: [PATCH] Put the arguments the right way around in emitter. --- lib/node-http-proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index c1275ab..b5de6bb 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -294,7 +294,7 @@ exports.stack = function stack (middlewares, proxy) { handle = function (req, res) { var next = function (err) { if (err) { - if (! proxy.emit('middlewareError', err, res, req)) { + if (! proxy.emit('middlewareError', err, req, res)) { console.error('Error in middleware(s): %s', err.stack); }