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

Long-Polling transport never switches to Callback-Polling in same-domain scenario #564

Open
sbordet opened this Issue Oct 20, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@sbordet
Member

sbordet commented Oct 20, 2014

Scenario:

  1. Disable websocket and long-polling on server
  2. Try to handshake to the same-domain URL
  3. Websocket transport fails as expected, CometD switches to Long-Polling
  4. Server returns 400 Unknown Transport
  5. The .accept() method of org.cometd.LongPollingTransport keeps returning true
  6. CometD JavaScript keeps trying to connect via Long-Polling (goto step 4).

It looks like this logic:

    _self.accept = function(version, crossDomain, url)
    {
        return _supportsCrossDomain || !crossDomain;
    };

is not enough, because it will always return true if request is same-domain, even if it fails.

@sbordet

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Oct 20, 2014

Member

Originally reported by givankin on 2014-10-20T05:52:58Z

Member

sbordet commented Oct 20, 2014

Originally reported by givankin on 2014-10-20T05:52:58Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment