[fix] make @mmalecki a happy camper

This commit is contained in:
yawnt 2013-09-13 19:07:34 +02:00
parent 1993faf8a4
commit c9cd6d2ad3
2 changed files with 5 additions and 4 deletions

View File

@ -51,6 +51,7 @@ proxy.createProxyServer = function createProxyServer(options) {
options.ee = new events.EventEmitter2({ wildcard: true, delimiter: ':' });
return {
ee : options.ee,
web : caronte.createWebProxy(options),
ws : caronte.createWsProxy(options),
listen : function listen(port) {
@ -63,9 +64,6 @@ proxy.createProxyServer = function createProxyServer(options) {
server.listen(port);
return server;
},
emitter : function() {
return options.ee;
}
};
};

View File

@ -30,9 +30,12 @@ function createRightProxy(type) {
return passes[pass];
});
return function(req, res) {
return function(req, res, opts) {
var self = this,
ev = 'caronte:' + type + ':';
if(typeof opts !== 'undefined') { options = opts; }
options.ee.emit(ev + 'begin', req, res);