Merge pull request #385 from nodejitsu/breaking-proxy-response

Change the emitter of the `proxyResponse` event
This commit is contained in:
Charlie Robbins 2013-03-17 22:51:50 -07:00
commit 4335f49b0e
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 // Allow observer to modify headers or abort response
try { req.emit('proxyResponse', req, res, response) } try { self.emit('proxyResponse', req, res, response) }
catch (ex) { catch (ex) {
errState = true; errState = true;
return; return;

View File

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