Commit 5364c6a
authored
browser(firefox): fix automatic http->https redirect (microsoft#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.1 parent 3c69f2a commit 5364c6a
File tree
3 files changed
+31
-14
lines changed- browser_patches/firefox
- juggler
- protocol
3 files changed
+31
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 | | |
135 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| 149 | + | |
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
| |||
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
160 | | - | |
| 170 | + | |
161 | 171 | | |
162 | 172 | | |
163 | 173 | | |
| |||
492 | 502 | | |
493 | 503 | | |
494 | 504 | | |
495 | | - | |
| 505 | + | |
496 | 506 | | |
497 | 507 | | |
498 | 508 | | |
| |||
506 | 516 | | |
507 | 517 | | |
508 | 518 | | |
| 519 | + | |
509 | 520 | | |
510 | | - | |
511 | | - | |
512 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
513 | 533 | | |
514 | 534 | | |
515 | 535 | | |
| |||
527 | 547 | | |
528 | 548 | | |
529 | 549 | | |
530 | | - | |
531 | | - | |
| 550 | + | |
| 551 | + | |
532 | 552 | | |
533 | 553 | | |
534 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 128 | + | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
| |||
0 commit comments