summaryrefslogtreecommitdiffstats
path: root/docshell/base/nsDocShell.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-05-26 15:00:01 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-05-26 15:42:45 -0400
commitbd851735628cd6b07285e87fa60081e9d11a3b7e (patch)
treec4a2831c9188f2d68e57c3b379bf86e7ff54cf93 /docshell/base/nsDocShell.cpp
parent8f354e52d09d1bf2fadfbbfc141d4f32241599a4 (diff)
downloadUXP-bd851735628cd6b07285e87fa60081e9d11a3b7e.tar
UXP-bd851735628cd6b07285e87fa60081e9d11a3b7e.tar.gz
UXP-bd851735628cd6b07285e87fa60081e9d11a3b7e.tar.lz
UXP-bd851735628cd6b07285e87fa60081e9d11a3b7e.tar.xz
UXP-bd851735628cd6b07285e87fa60081e9d11a3b7e.zip
Remove support and tests for HSTS priming from the tree. Fixes #384
Diffstat (limited to 'docshell/base/nsDocShell.cpp')
-rw-r--r--docshell/base/nsDocShell.cpp21
1 files changed, 0 insertions, 21 deletions
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<nsIDocShell> 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<nsIPrincipal> principalToInherit = aPrincipalToInherit;