diff --git a/lib/manager.js b/lib/manager.js index a2efbe9aac..e5c7fecafe 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -511,7 +511,7 @@ Manager.prototype.onClientMessage = function (id, packet) { * @api private */ -Manager.prototype.onClientDisconnect = function (id, reason) { +Manager.prototype.onClientDisconnect = function (id, reason, local) { for (var name in this.namespaces) { if (this.namespaces.hasOwnProperty(name)) { this.namespaces[name].handleDisconnect(id, reason, typeof this.roomClients[id] !== 'undefined' && @@ -519,7 +519,7 @@ Manager.prototype.onClientDisconnect = function (id, reason) { } } - this.onDisconnect(id); + this.onDisconnect(id, local); }; /** @@ -901,7 +901,7 @@ Manager.prototype.authorize = function (data, fn) { var self = this; this.get('authorization').call(this, data, function (err, authorized) { - self.log.debug('client ' + authorized ? 'authorized' : 'unauthorized'); + self.log.debug('client ' + (authorized ? 'authorized' : 'unauthorized')); fn(err, authorized); }); } else { diff --git a/lib/transports/http.js b/lib/transports/http.js index 28db794dfb..d3a206432d 100644 --- a/lib/transports/http.js +++ b/lib/transports/http.js @@ -50,7 +50,7 @@ HTTPTransport.prototype.handleRequest = function (req) { var buffer = '' , res = req.res , origin = req.headers.origin - , headers = { 'Content-Length': 1, 'Content-Type': 'text/plain; charset=UTF-8' } + , headers = { 'Content-Length': 1, 'Content-Type': 'application/javascript; charset=UTF-8' } , self = this; req.on('data', function (data) {