-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[atmosphere.js] Problem with JSESSIONID and GlassFish #351
Comments
Integrated |
I got it! Here is my fix. function _buildWebSocketUrl() {
var url = _request.url;
url = _attachHeaders();
return decodeURI($('<a href="' + url + '"/>')[0].href.replace(/^http/, "ws"));
} 4th line converts any url into absolute url whose scheme is ws or wss using DOM api, and it's actually used in jquery-socket's websocket transport - https://github.com/flowersinthesand/jquery-socket/blob/master/jquery.socket.js#L680 You don't need even parseUri function. Otherwise, at least you should check protocol is valid instead of checking var url = "/what-is-://", urlHasScheme = /^[\w\+\.\-]+:/.test(url); |
Many thanks for that!! I've integrated your fix. Thanks!!! |
…ix taken from jquery-socket library
See
The text was updated successfully, but these errors were encountered: