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

Get response url from response.xhr on ie11 #3472

Closed
l-pawliczak opened this issue Mar 25, 2018 · 2 comments
Closed

Get response url from response.xhr on ie11 #3472

l-pawliczak opened this issue Mar 25, 2018 · 2 comments
Assignees
Labels
help wanted Issues we wouldn't mind assistance with.

Comments

@l-pawliczak
Copy link

l-pawliczak commented Mar 25, 2018

RxJS version:
5.5.6

Observable version:
0.18.0

Code to reproduce:

export default response => Observable.if(
  () => response.xhr.responseURL.indexOf(URL_PART) !== -1,
  Observable.throw('redirect'),
  Observable.of(response.response),
);

Expected behavior:
return response or redirect (works fine in ff and chrome)

Actual behavior:
"Exception thrown and not caught" in file Observable.js, line 165 in IE11

There is any other way to get response URL on IE11? Or Someone see something wrong in my code? I tried babel-polyfill but still same error.

@benlesh benlesh added the help wanted Issues we wouldn't mind assistance with. label Apr 2, 2018
@jichang
Copy link

jichang commented Apr 8, 2018

The problem is IE11 and old Edge don't have responseURL property on XMLHttpRequest object. Lots of frameworks will use request url as a fallback, but this will fail when 30x redirects happens. The only reliable solution maybe is the backend server set some custom header to indicate response url, so I don't think rxjs need to solve this

@benlesh
Copy link
Member

benlesh commented Oct 2, 2019

I agree. This isn't something we can fix on the RxJS side.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Issues we wouldn't mind assistance with.
Projects
None yet
Development

No branches or pull requests

4 participants