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

browser(firefox): fix automatic http->https redirect #3812

Merged
merged 2 commits into from
Sep 9, 2020
Merged

browser(firefox): fix automatic http->https redirect #3812

merged 2 commits into from
Sep 9, 2020

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Sep 9, 2020

Sometimes, Firefox does an automatic http->https redirect without hitting
the network (e.g. for http://wikipedia.org). In this case, the http request
is very strange:

  • it does not actually hit the network;
  • it is never intercepted;
  • we cannot access its response because there was no actual response.

So, we had a bug where:

  • redirects inherited the original request's listener;
  • that listener was throwing an error.
    This lead to the error in the listeners onDataAvailable call chain,
    and original listener that renders the response was never called,
    resulting in an empty page.

This change:

  • ignores the original request that did not hit the network;
  • does not inherit the listener;
  • adds try/catch around problematic calls.

Fixes #3776

Sometimes, Firefox does an automatic http->https redirect without hitting
the network (e.g. for http://wikipedia.org). In this case, the http request
is very strange:
- it does not actually hit the network;
- it is never intercepted;
- we cannot access its response because there was no actual response.

So, we had a bug where:
- redirects inherited the original request's listener;
- that listener was throwing an error.
This lead to the error in the listeners onDataAvailable call chain,
and original listener that renders the response was never called,
resulting in an empty page.

This change fixes both issues: we do not inherit the listener and
also try/catch problematic calls.

There is still an issue that we cannot intercept such a request.
@dgozman dgozman merged commit 5364c6a into microsoft:master Sep 9, 2020
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.

[BUG] Firefox initial goto on http site with a redirect won't render
3 participants