Bug 1742899: Exempt history entry loads from https-first mode. r=ckerschb,smaug

Differential Revision: https://phabricator.services.mozilla.com/D132566
This commit is contained in:
Niklas Goegge 2021-12-09 16:12:09 +00:00
Родитель 1577c9ff90
Коммит 9f9b6db969
3 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -243,6 +243,11 @@ void SessionHistoryInfo::FillLoadInfo(nsDocShellLoadState& aLoadState) const {
aLoadState.SetInternalLoadFlags(flags);
aLoadState.SetFirstParty(true);
// When we create a load state from the history info we already know if
// https-first was able to upgrade the request from http to https. There is no
// point in re-retrying to upgrade.
aLoadState.SetIsExemptFromHTTPSOnlyMode(true);
}
/* static */
SessionHistoryInfo::SharedState SessionHistoryInfo::SharedState::Create(

Просмотреть файл

@ -939,6 +939,11 @@ nsSHEntry::CreateLoadInfo(nsDocShellLoadState** aLoadState) {
loadState->SetSHEntry(this);
// When we create a load state from the history entry we already know if
// https-first was able to upgrade the request from http to https. There is no
// point in re-retrying to upgrade.
loadState->SetIsExemptFromHTTPSOnlyMode(true);
loadState.forget(aLoadState);
return NS_OK;
}

Просмотреть файл

@ -2231,6 +2231,11 @@ void nsSHistory::InitiateLoad(nsISHEntry* aFrameEntry,
loadState->SetHasValidUserGestureActivation(aUserActivation);
// At the time we initiate a history entry load we already know if https-first
// was able to upgrade the request from http to https. There is no point in
// re-retrying to upgrade.
loadState->SetIsExemptFromHTTPSOnlyMode(true);
/* Set the loadType in the SHEntry too to what was passed on.
* This will be passed on to child subframes later in nsDocShell,
* so that proper loadType is maintained through out a frameset