Permalink
Browse files

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

Change the emitter of the `proxyResponse` event
  • Loading branch information...
2 parents ea10bb2 + 2620f06 commit 4335f49b0eb2bd0d7b44f4c20a6ada4eab1dc292 @indexzero indexzero committed Mar 18, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/node-http-proxy/http-proxy.js
  2. +1 −0 lib/node-http-proxy/routing-proxy.js
@@ -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;
@@ -116,6 +116,7 @@ RoutingProxy.prototype.add = function (options) {
'start',
'forward',
'end',
+ 'proxyResponse',
'websocket:start',
'websocket:end',
'websocket:incoming',

0 comments on commit 4335f49

Please sign in to comment.