fix: do not send Fetch.continueRequest twice for auth requests (#10382)

This commit is contained in:
Yury Semikhatsky 2021-11-17 11:42:06 -08:00 committed by GitHub
parent 6e2bc890a6
commit 7746cb52a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,11 +161,6 @@ export class CRNetworkManager {
this._responseExtraInfoTracker.requestPaused(request.request, event);
}
if (!this._userRequestInterceptionEnabled && this._protocolRequestInterceptionEnabled) {
this._client._sendMayFail('Fetch.continueRequest', {
requestId: event.requestId
});
}
if (!event.networkId) {
// Fetch without networkId means that request was not recongnized by inspector, and
// it will never receive Network.requestWillBeSent. Most likely, this is an internal request
@ -249,7 +244,7 @@ export class CRNetworkManager {
let route = null;
if (requestPausedEvent) {
// We do not support intercepting redirects.
if (redirectedFrom)
if (redirectedFrom || (!this._userRequestInterceptionEnabled && this._protocolRequestInterceptionEnabled))
this._client._sendMayFail('Fetch.continueRequest', { requestId: requestPausedEvent.requestId });
else
route = new RouteImpl(this._client, requestPausedEvent.requestId);