yBug 1423278 - Correctly instantiate proxy authenticator with a lowercase schema, r=jduell
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 29 Aug 2018 14:04:00 +0300
changeset 491778 10c2d7ed3aaff4334d186739c2978dcb8f46226d
parent 491777 bc6567e31d48dd62be7df4a9d11fd74621858b53
child 491779 af9308e581b85f79ad8b82bdd943df3d3cbc3c07
child 491792 169b47aeda91a0122dcb491a501db4d4543b5e48
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs1423278
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
yBug 1423278 - Correctly instantiate proxy authenticator with a lowercase schema, r=jduell
netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
@@ -510,23 +510,21 @@ nsHttpChannelAuthProvider::PrepareForAut
     }
 
     if (!UsingHttpProxy() || mProxyAuthType.IsEmpty())
         return NS_OK;
 
     // We need to remove any Proxy_Authorization header left over from a
     // non-request based authentication handshake (e.g., for NTLM auth).
 
-    nsAutoCString contractId;
-    contractId.AssignLiteral(NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX);
-    contractId.Append(mProxyAuthType);
-
     nsresult rv;
-    nsCOMPtr<nsIHttpAuthenticator> precedingAuth =
-        do_GetService(contractId.get(), &rv);
+    nsCOMPtr<nsIHttpAuthenticator> precedingAuth;
+    nsCString proxyAuthType;
+    rv = GetAuthenticator(mProxyAuthType.get(), proxyAuthType,
+                          getter_AddRefs(precedingAuth));
     if (NS_FAILED(rv))
         return rv;
 
     uint32_t precedingAuthFlags;
     rv = precedingAuth->GetAuthFlags(&precedingAuthFlags);
     if (NS_FAILED(rv))
         return rv;