Bug 1549405 - Use LOAD_BYPASS_URL_ClASSIFIER flag for TRR request. r=valentin
authordlee <dlee@mozilla.com>
Mon, 06 May 2019 19:05:02 +0000
changeset 535639 28912333e8b808d478f432ca66bc6349c3624349
parent 535638 8fb278dd620a5dab42e6ecc175ab7418ec62a72a
child 535640 ca347ea97ee31b859bc250936cf6e4256198c516
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1549405
milestone68.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
Bug 1549405 - Use LOAD_BYPASS_URL_ClASSIFIER flag for TRR request. r=valentin We should add LOAD_BYPASS_URL_ClASSIFIER to TRR request because if "network.trr.mode" is set to 3, blocked TRR request means DNS resolution fail, we don't fall back to regular DNS in this scenario. Differential Revision: https://phabricator.services.mozilla.com/D30085
netwerk/dns/TRR.cpp
--- a/netwerk/dns/TRR.cpp
+++ b/netwerk/dns/TRR.cpp
@@ -235,17 +235,18 @@ nsresult TRR::SendHTTPRequest() {
   rv = NS_NewChannel(
       getter_AddRefs(mChannel), dnsURI, nsContentUtils::GetSystemPrincipal(),
       nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
       nsIContentPolicy::TYPE_OTHER,
       nullptr,  // nsICookieSettings
       nullptr,  // PerformanceStorage
       nullptr,  // aLoadGroup
       this,
-      nsIRequest::LOAD_ANONYMOUS | (mPB ? nsIRequest::INHIBIT_CACHING : 0),
+      nsIRequest::LOAD_ANONYMOUS | (mPB ? nsIRequest::INHIBIT_CACHING : 0) |
+          nsIChannel::LOAD_BYPASS_URL_CLASSIFIER,
       ios);
   if (NS_FAILED(rv)) {
     LOG(("TRR:SendHTTPRequest: NewChannel failed!\n"));
     return rv;
   }
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
   if (!httpChannel) {