Backout changeset 000ed86d069f (bug 861117) which caused bug 871560. a=lsblakk
authorSid Stamm <sstamm@mozilla.com>
Thu, 16 May 2013 11:26:33 -0700
changeset 142671 52d3f8780c6d021f140435de8d4b72bbd79761ca
parent 142670 2238b2e424827ddae814d8e3057f7d56090d061e
child 142672 fd4da843d914b3c9d413a78106c508569cfa670f
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsblakk
bugs861117, 871560
milestone23.0a2
backs out000ed86d069f391a7d66d341dda2d416551fa14c
Backout changeset 000ed86d069f (bug 861117) which caused bug 871560. a=lsblakk
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -366,22 +366,22 @@ nsHttpChannel::Connect()
         // enforce Strict-Transport-Security
         nsIStrictTransportSecurityService* stss = gHttpHandler->GetSTSService();
         NS_ENSURE_TRUE(stss, NS_ERROR_OUT_OF_MEMORY);
 
         bool isStsHost = false;
         uint32_t flags = mPrivateBrowsing ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
         rv = stss->IsStsURI(mURI, flags, &isStsHost);
 
-        // if the URI check fails, it's likely because this load is on a
-        // malformed URI or something else in the setup is wrong, so any error
-        // should be reported.
-        NS_ENSURE_SUCCESS(rv, rv);
-
-        if (isStsHost) {
+        // if STS fails, there's no reason to cancel the load, but it's
+        // worrisome.
+        NS_ASSERTION(NS_SUCCEEDED(rv),
+                     "Something is wrong with STS: IsStsURI failed.");
+
+        if (NS_SUCCEEDED(rv) && isStsHost) {
             LOG(("nsHttpChannel::Connect() STS permissions found\n"));
             return AsyncCall(&nsHttpChannel::HandleAsyncRedirectChannelToHttps);
         }
 
         // Check for a previous SPDY Alternate-Protocol directive
         if (gHttpHandler->IsSpdyEnabled() && mAllowSpdy) {
             nsAutoCString hostPort;