From 5fb13a26ed03d8b29fcb11fb11b3a23b5fb00239 Mon Sep 17 00:00:00 2001 From: mathieucarbou Date: Tue, 1 Mar 2011 15:46:26 -0500 Subject: [PATCH] Fixing bad URL in request when connecting: // Some web frameworks or IOC frameworks are rewriting URLs when we issue a request.getPathInfo() so // is transformed in / and the prsing to get the session id fails --- lib/transport.js | 2 +- lib/transports/websocket.js | 2 +- socket.io.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/transport.js b/lib/transport.js index f69ce3db9..1d178cd42 100644 --- a/lib/transport.js +++ b/lib/transport.js @@ -227,7 +227,7 @@ + ':' + this.base.options.port + '/' + this.base.options.resource + '/' + this.type - + (this.sessionid ? ('/' + this.sessionid) : '/'); + + '/' + (this.sessionid ? this.sessionid : 'null'); }; })(); \ No newline at end of file diff --git a/lib/transports/websocket.js b/lib/transports/websocket.js index b3c3d1fc3..f543ec94f 100644 --- a/lib/transports/websocket.js +++ b/lib/transports/websocket.js @@ -88,7 +88,7 @@ + ':' + this.base.options.port + '/' + this.base.options.resource + '/' + this.type - + (this.sessionid ? ('/' + this.sessionid) : ''); + + '/' + (this.sessionid ? this.sessionid : 'null'); }; WS.check = function(){ diff --git a/socket.io.js b/socket.io.js index 328a7d355..c3eecb3bb 100644 --- a/socket.io.js +++ b/socket.io.js @@ -313,7 +313,7 @@ if (typeof window != 'undefined'){ + ':' + this.base.options.port + '/' + this.base.options.resource + '/' + this.type - + (this.sessionid ? ('/' + this.sessionid) : '/'); + + '/' + (this.sessionid ? this.sessionid : 'null'); }; })(); @@ -548,7 +548,7 @@ if (typeof window != 'undefined'){ + ':' + this.base.options.port + '/' + this.base.options.resource + '/' + this.type - + (this.sessionid ? ('/' + this.sessionid) : ''); + + '/' + (this.sessionid ? this.sessionid : 'null'); }; WS.check = function(){