From bd851735628cd6b07285e87fa60081e9d11a3b7e Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 26 May 2018 15:00:01 -0400 Subject: Remove support and tests for HSTS priming from the tree. Fixes #384 --- docshell/base/nsDocShell.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'docshell') diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index b3e26da33..8eca47495 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -9961,27 +9961,6 @@ nsDocShell::InternalLoad(nsIURI* aURI, return NS_ERROR_CONTENT_BLOCKED; } - - // If HSTS priming was set by nsMixedContentBlocker::ShouldLoad, and we - // would block due to mixed content, go ahead and block here. If we try to - // proceed with priming, we will error out later on. - nsCOMPtr docShell = NS_CP_GetDocShellFromContext(requestingContext); - // When loading toplevel windows, requestingContext can be null. We don't - // really care about HSTS in that situation, though; loads in toplevel - // windows should all be browser UI. - if (docShell) { - nsIDocument* document = docShell->GetDocument(); - NS_ENSURE_TRUE(document, NS_OK); - - HSTSPrimingState state = document->GetHSTSPrimingStateForLocation(aURI); - if (state == HSTSPrimingState::eHSTS_PRIMING_BLOCK) { - // HSTS Priming currently disabled for InternalLoad, so we need to clear - // the location that was added by nsMixedContentBlocker::ShouldLoad - // Bug 1269815 will address images loaded via InternalLoad - document->ClearHSTSPrimingLocation(aURI); - return NS_ERROR_CONTENT_BLOCKED; - } - } } nsCOMPtr principalToInherit = aPrincipalToInherit; -- cgit v1.2.3