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

Use XDomainRequest in browsers which can't CORS with XMLHttpRequest #55

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

Conversation

gobengo
Copy link

@gobengo gobengo commented Jul 8, 2014

#3 has been open and unresponded to for three years. I +1d it, but went to use that fork and realized it didn't really even work.

This pull request is up to date with 1.4.1, and I've tested it a good amount in IE9 while working on https://github.com/gobengo/chronos-stream, and more important will continue to maintain it for my job @Livefyre in the forseeable future.

@substack, now with some legwork into this, will you please respond and say whether you find this change in scope appropriate for http-browserify and the OOB 'http' builtin?

If you never want it in the builtin, we can close this PR and folks can just use http-browserify-xdr manually if they want. But at least this issue will be here for posterity.

If you are supportive, I'll get the README changes out of this PR that I made.

@@ -26,8 +26,7 @@ http.request = function (params, cb) {
params.host = params.host.split(':')[0];
}
if (!params.port) params.port = params.scheme == 'https' ? 443 : 80;

var req = new Request(new xhrHttp, params);
var req = new Request(new (xhrHttp(params)), params);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an appropriate XHR-like thing is now chosen based on the params, not just once at eval time

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