From cd4dee725787dd3af38abcb355d31516acf5fe71 Mon Sep 17 00:00:00 2001 From: Stephen Touset Date: Fri, 9 Nov 2012 17:49:40 -0800 Subject: [PATCH 1/3] Respect operator precedence --- lib/manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/manager.js b/lib/manager.js index 6c12a52f14..7c5435efa5 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -900,7 +900,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 { From 6256f569b3a0343eacdec7ecea3de247eb64e49b Mon Sep 17 00:00:00 2001 From: George Ornbo Date: Mon, 12 Nov 2012 13:11:23 +0000 Subject: [PATCH 2/3] fix leaking message:id, disconnect:id #1081 #1064 #862 --- lib/manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/manager.js b/lib/manager.js index 6c12a52f14..a50808ec09 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -510,7 +510,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' && @@ -518,7 +518,7 @@ Manager.prototype.onClientDisconnect = function (id, reason) { } } - this.onDisconnect(id); + this.onDisconnect(id, local); }; /** From ef54570313ddcc41aef765639652ba05f04f0039 Mon Sep 17 00:00:00 2001 From: Sampsa Saarela Date: Tue, 20 Nov 2012 11:53:01 +0200 Subject: [PATCH 3/3] Changed content-type in response header from text/plain to application/javascript because some browsers force file download (eg. symbian anna) --- lib/transports/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {