browser(firefox): fix redirect interception (#2672)
We sometimes receive shouldIntercept for redirects, and should not issue sendOnRequest for the second time.
This commit is contained in:
parent
bb34418095
commit
3d49af2537
|
|
@ -1 +1 @@
|
|||
1114
|
||||
1115
|
||||
|
|
|
|||
|
|
@ -320,6 +320,12 @@ class NetworkRequest {
|
|||
return false;
|
||||
}
|
||||
|
||||
// We do not want to intercept any redirects, because we are not able
|
||||
// to intercept subresource redirects, and it's unreliable for main requests.
|
||||
// We do not sendOnRequest here, because redirects do that in constructor.
|
||||
if (this.redirectedFromId)
|
||||
return false;
|
||||
|
||||
const shouldIntercept = this._shouldIntercept();
|
||||
if (!shouldIntercept) {
|
||||
// We are not intercepting - ready to issue onRequest.
|
||||
|
|
@ -424,10 +430,6 @@ class NetworkRequest {
|
|||
}
|
||||
|
||||
_shouldIntercept() {
|
||||
// We do not want to intercept any redirects, because we are not able
|
||||
// to intercept subresource redirects.
|
||||
if (this.redirectedFromId)
|
||||
return false;
|
||||
const pageNetwork = this._activePageNetwork();
|
||||
if (!pageNetwork)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue