Skip to content
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

No Cookie and session information in the unsubscribe request #1313

Closed
Swaroop-Bhupathiraju opened this issue Sep 24, 2013 · 3 comments
Closed
Labels

Comments

@Swaroop-Bhupathiraju
Copy link

Whenever web socket connection is closed (due to a browser refresh or browser close event), the server gets a request with Transport as 'close' but it does not have any cookie information or session information.

image

Reference:
https://groups.google.com/forum/#!topic/atmosphere-framework/30acqQzE1Hk

@Swaroop-Bhupathiraju
Copy link
Author

I use jsonp to do a cross domain call to the atmosphere server for normal http requests.
When the browser supports websockets, i use websocket communication but when a unsubscribe event happens, i think atmosphere sends the disconnect call (transport=close) as a regular http call to the server but not as a jsonp call.
In case of cross domain http requests, the session and cookie is not sent
JSONP might not be possible here as this will be a synchronous request
function _disconnect() {
if (_request.enableProtocol && !_request.firstMessage) {
var query = "X-Atmosphere-Transport=close&X-Atmosphere-tracking-id=" + _request.uuid;
var url = request.url.replace(/([?&])=[^&]*/, query);
url = url + (url === _request.url ? (/?/.test(_request.url) ? "&" : "?") + query : "");

                if (_request.connectTimeout > 0) {
                    jQuery.ajax({
                        url: url,
                        async: false,
                        timeout: _request.connectTimeout
                    });

@jfarcand
Copy link
Member

@Swaroop-Bhupathiraju This is a different issue IMO. So open a new one :-)

@Swaroop-Bhupathiraju
Copy link
Author

@jfarcand created a new jira for this issue.
#1315.

Thanks,
Swaroop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants