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

Conversation

@stevenp
Copy link
Contributor

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

This comment has been minimized.

Copy link

commented May 4, 2016

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@nickuraltsev

This comment has been minimized.

Copy link
Member

commented May 4, 2016

Thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.