mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1661077 - HTTPS-Only error page only shows up after a failed upgrade. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D88166
This commit is contained in:
parent
a9c523c4c8
commit
718e32fae5
@ -197,9 +197,19 @@ bool nsHTTPSOnlyUtils::CouldBeHttpsOnlyError(nsIChannel* aChannel,
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the load is exempt, then there is nothing to do here.
|
||||
// httpsOnlyStatus is reset to it's default value in the child-process after
|
||||
// our forced timeout. Until we figure out why it's reset (bug 1661275) we
|
||||
// have this workaround:
|
||||
uint32_t httpsOnlyStatus = loadInfo->GetHttpsOnlyStatus();
|
||||
if (httpsOnlyStatus & nsILoadInfo::HTTPS_ONLY_EXEMPT) {
|
||||
if (httpsOnlyStatus & nsILoadInfo::HTTPS_ONLY_UNINITIALIZED &&
|
||||
!XRE_IsParentProcess() && aError == NS_ERROR_NET_TIMEOUT) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the load is exempt or did not get upgraded,
|
||||
// then there is nothing to do here.
|
||||
if (httpsOnlyStatus & nsILoadInfo::HTTPS_ONLY_EXEMPT ||
|
||||
httpsOnlyStatus & nsILoadInfo::HTTPS_ONLY_UNINITIALIZED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,7 @@ class AboutHttpsOnlyErrorParent extends JSWindowActorParent {
|
||||
: newURI.spec;
|
||||
aBrowser.loadURI(insecureSpec, {
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user