Bug 1904238 - Don't copy over https-first and -only flags on http redirects r=maltejur
To not unexpectedly downgrade requests that weren't upgraded via HTTPS-First. From the added tests only the http redirect test cases start passing with this patch. META and JS redirect already pass before this patch. Differential Revision: https://phabricator.services.mozilla.com/D215214
This commit is contained in:
@@ -4437,6 +4437,11 @@ already_AddRefed<nsILoadInfo> HttpBaseChannel::CloneLoadInfoForRedirect(
|
||||
newLoadInfo->SetLoadTriggeredFromExternal(false);
|
||||
}
|
||||
newLoadInfo->ResetSandboxedNullPrincipalID();
|
||||
|
||||
// Reset HTTPS-first and -only status on http redirect. To not unexpectedly
|
||||
// downgrade requests that weren't upgraded via HTTPS-First (Bug 1904238).
|
||||
Unused << newLoadInfo->SetHttpsOnlyStatus(
|
||||
nsILoadInfo::HTTPS_ONLY_UNINITIALIZED);
|
||||
}
|
||||
|
||||
newLoadInfo->AppendRedirectHistoryEntry(this, isInternalRedirect);
|
||||
|
||||
Reference in New Issue
Block a user