Backed out changeset 30d7636620f8 (bug 1804684) as req by smaug

This commit is contained in:
Narcis Beleuzu
2023-01-09 22:51:57 +02:00
parent 51937fb742
commit eb0afc6ef2
7 changed files with 7 additions and 30 deletions

View File

@@ -8746,15 +8746,6 @@ bool nsDocShell::IsSameDocumentNavigation(nsDocShellLoadState* aLoadState,
if (!docLoadInfo->GetLoadErrorPage()) {
if (nsHTTPSOnlyUtils::IsEqualURIExceptSchemeAndRef(
currentExposableURI, aLoadState->URI(), docLoadInfo)) {
// At this point the requested URI is for sure a fragment
// navigation via HTTP and HTTPS-Only mode or HTTPS-First is
// enabled. Since we are on an HTTPS site the fragment
// navigation should also be an HTTPS.
// For that reason we upgrade the URI to HTTPS.
nsCOMPtr<nsIURI> upgradedURI;
NS_GetSecureUpgradedURI(aLoadState->URI(),
getter_AddRefs(upgradedURI));
aLoadState->SetURI(upgradedURI);
aState.mSameExceptHashes = true;
}
}