Backed out changeset b09095eaf7d9 (bug 1702001) for causing failures on test_insecure_reload.html. CLOSED TREE

This commit is contained in:
Csoregi Natalia
2021-04-08 12:28:19 +03:00
parent a629f3f5ac
commit 48931226bc
5 changed files with 10 additions and 115 deletions

View File

@@ -8826,17 +8826,15 @@ bool nsDocShell::IsSameDocumentNavigation(nsDocShellLoadState* aLoadState,
// HTTPS-Only Mode is enabled and the two URIs are same-origin (modulo the
// fact that the new URI is currently http), then set mSameExceptHashes to
// true and only perform a fragment navigation.
if (!aState.mSameExceptHashes) {
nsCOMPtr<nsIChannel> docChannel = GetCurrentDocChannel();
if (docChannel) {
nsCOMPtr<nsILoadInfo> docLoadInfo = docChannel->LoadInfo();
if (!docLoadInfo->GetLoadErrorPage()) {
if (nsHTTPSOnlyUtils::IsEqualURIExceptSchemeAndRef(
currentExposableURI, aLoadState->URI(), docLoadInfo)) {
aState.mSameExceptHashes = true;
}
}
}
nsCOMPtr<nsIChannel> docChannel = GetCurrentDocChannel();
nsCOMPtr<nsILoadInfo> loadInfo;
if (docChannel) {
loadInfo = docChannel->LoadInfo();
}
if (!aState.mSameExceptHashes &&
nsHTTPSOnlyUtils::IsEqualURIExceptSchemeAndRef(
currentExposableURI, aLoadState->URI(), loadInfo)) {
aState.mSameExceptHashes = true;
}
}
}