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

Only set empty handlers for IE CORS support if using XDomainRequest #313

Merged
merged 1 commit into from May 4, 2016
Merged

Only set empty handlers for IE CORS support if using XDomainRequest #313

merged 1 commit into from May 4, 2016

Conversation

stevenp
Copy link
Contributor

@stevenp stevenp commented May 4, 2016

I ran into a mysterious issue after upgrading Axios from 0.9.1 to 0.11.0 where a Selenium test was timing out only on Firefox, and was able to bisect the issue down to this commit. I'm assuming that this change was added based on the workaround for the issue reported here.

The problem seems to be that these handlers are being set on the request, even in test mode, which seems to have an unintended effect on promise resolution in Selenium, which I assume uses these handlers, but I haven't been able to find an exact path to track down the root cause.

This PR moves the workaround into the block that sets request to an XDomainRequest, and fixes the issue. I'm assuming there isn't a reason that these should be set to empty handlers in any other case.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 91.254% when pulling f32b5a6 on icracked:master into ea37522 on mzabriskie:master.

@nickuraltsev nickuraltsev merged commit 580ef52 into axios:master May 4, 2016
@nickuraltsev
Copy link
Member

Thank you for the PR!

@axios axios locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants