Chrome and safari CORS fix#111
Open
sawantuday wants to merge 2 commits into
Open
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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