Bug 1899563 - Upgrade service worker request before http-on-before-connect r=valentin,necko-reviewers,asuth

Differential Revision: https://phabricator.services.mozilla.com/D212070
This commit is contained in:
Julian Descottes 2024-05-30 15:57:59 +00:00
parent 08d8d8051b
commit cee070dc5a

View file

@ -861,6 +861,10 @@ nsresult nsHttpChannel::ContinueOnBeforeConnect(bool aShouldUpgrade,
!Http3Allowed(), std::move(aServerCertHashes));
}
if (ShouldIntercept()) {
return RedirectToInterceptedChannel();
}
// notify "http-on-before-connect" observers
gHttpHandler->OnBeforeConnect(this);
@ -876,10 +880,6 @@ nsresult nsHttpChannel::Connect() {
return NS_ERROR_DOCUMENT_NOT_CACHED;
}
if (ShouldIntercept()) {
return RedirectToInterceptedChannel();
}
// Step 8.18 of HTTP-network-or-cache fetch
// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
nsAutoCString rangeVal;