[fix breaking] Emit the proxyResponse event on the HttpProxy instance to reduce listener churn and reference counts.

This commit is contained in:
indexzero 2013-03-18 01:49:01 -04:00
parent 701dc698e3
commit 2620f06e2d
2 changed files with 2 additions and 1 deletions

View File

@ -318,7 +318,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
});
// Allow observer to modify headers or abort response
try { req.emit('proxyResponse', req, res, response) }
try { self.emit('proxyResponse', req, res, response) }
catch (ex) {
errState = true;
return;

View File

@ -116,6 +116,7 @@ RoutingProxy.prototype.add = function (options) {
'start',
'forward',
'end',
'proxyResponse',
'websocket:start',
'websocket:end',
'websocket:incoming',