playwright/browser_patches/firefox/juggler/protocol
Dmitry Gozman 5364c6acbc
browser(firefox): fix automatic http->https redirect (#3812)
browser(firefox): fix automatic http->https redirect

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.
2020-09-09 09:16:03 -07:00
..
AccessibilityHandler.js chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
BrowserHandler.js browser(firefox): introduce browser level screencastFinished event (#3625) 2020-08-25 14:50:40 -07:00
Dispatcher.js browser(firefox): introduce browser level screencastFinished event (#3625) 2020-08-25 14:50:40 -07:00
NetworkHandler.js browser(firefox): fix automatic http->https redirect (#3812) 2020-09-09 09:16:03 -07:00
PageHandler.js browser(firefox): introduce browser level screencastFinished event (#3625) 2020-08-25 14:50:40 -07:00
PrimitiveTypes.js chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
Protocol.js browser(firefox): introduce browser level screencastFinished event (#3625) 2020-08-25 14:50:40 -07:00
RuntimeHandler.js chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00