Bug 1547704 - CaptiveDetect.jsm requires LOAD_BYPASS_URL_ClASSIFIER flag r=mayhemer
authorValentin Gosu <valentin.gosu@gmail.com>
Fri, 21 Jun 2019 23:18:31 +0000
changeset 479945 f8b0d976dd319f765dfd966495fe1257fb6eade7
parent 479944 7ba2e797e0a9ef8e49baad19a8cb65454b103155
child 479946 51b4af33ce0d15ad3d424e6305fc31492987ef05
push id88379
push uservalentin.gosu@gmail.com
push dateMon, 24 Jun 2019 10:19:39 +0000
treeherderautoland@f8b0d976dd31 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1547704
milestone69.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 1547704 - CaptiveDetect.jsm requires LOAD_BYPASS_URL_ClASSIFIER flag r=mayhemer Differential Revision: https://phabricator.services.mozilla.com/D35476
toolkit/components/captivedetect/CaptiveDetect.jsm
--- a/toolkit/components/captivedetect/CaptiveDetect.jsm
+++ b/toolkit/components/captivedetect/CaptiveDetect.jsm
@@ -26,16 +26,18 @@ function URLFetcher(url, timeout) {
   // Prevent the request from reading from the cache.
   xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
   // Prevent the request from writing to the cache.
   xhr.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
   // Prevent privacy leaks
   xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_ANONYMOUS;
   // Use the system's resolver for this check
   xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_DISABLE_TRR;
+  // We except this from being classified
+  xhr.channel.loadFlags |= Ci.nsIChannel.LOAD_BYPASS_URL_CLASSIFIER;
 
   // We don't want to follow _any_ redirects
   xhr.channel.QueryInterface(Ci.nsIHttpChannel).redirectionLimit = 0;
 
   // The Cache-Control header is only interpreted by proxies and the
   // final destination. It does not help if a resource is already
   // cached locally.
   xhr.setRequestHeader("Cache-Control", "no-cache");