bug 785050 - dns failure during auth is not a hard failure r=jduell
authorPatrick McManus <mcmanus@ducksong.com>
Tue, 16 Oct 2012 15:13:52 -0400
changeset 110578 073b904aed0cd056c425125a14323e263cc58e4c
parent 110577 9ba7d327ce675fca4d353c36fc0be10cdba8237e
child 110579 b8b86cd19f38a16518b678a37f9bb15cc0cff63b
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersjduell
bugs785050
milestone19.0a1
bug 785050 - dns failure during auth is not a hard failure r=jduell
netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
@@ -1389,22 +1389,23 @@ nsHttpChannelAuthProvider::DNSCallback::
 
     if (NS_SUCCEEDED(rv))
         rv = record->GetCanonicalName(cname);
 
     if (NS_SUCCEEDED(rv)) {
         LOG(("nsHttpChannelAuthProvider::OnLookupComplete this=%p "
              "resolved to %s\n", mAuthProvider.get(), cname.get()));
         mAuthProvider->SetCanonicalizedHost(cname);
-        mAuthProvider->OnAuthAvailable(nullptr, nullptr);
     }
     else {
         LOG(("nsHttpChannelAuthProvider::OnLookupComplete this=%p "
              "GetCanonicalName failed\n", mAuthProvider.get()));
-        mAuthProvider->OnAuthCancelled(nullptr, false);
     }
+
+    // Proceed whether or not DNS canonicalization succeeded
+    mAuthProvider->OnAuthAvailable(nullptr, nullptr);
     return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS3(nsHttpChannelAuthProvider, nsICancelable,
                    nsIHttpChannelAuthProvider, nsIAuthPromptCallback)
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsHttpChannelAuthProvider::DNSCallback,
                               nsIDNSListener)