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

Chrome and safari CORS fix #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sawantuday
Copy link

This is a chrome CORS fix,
Chrome changes the request method from POST to
OPTIONS thus not carriying the initial xml stanza.
this keeps the http request pending for random time
period before restarting it.
Setting content type of the request to text/plain avoids this problem

@metajack
Copy link
Owner

I'm not sure this fix makes sense.

Chrome is not changing a POST into an OPTIONS. It's making a preflight request with OPTIONS to determine CORS support. See http://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0 for details.

I'm not aware of a bug in Chrome regarding this, and I used Chrome with Strophe.js quite heavily for several years.

Am I misunderstanding the problem? It's possible there is a bug, but I'm having trouble understanding what it is from your description.

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

Successfully merging this pull request may close these issues.

2 participants