Bug 1296802 - remove LOAD_CLASSIFY_URI flag to prevent telemetry pings from running through the URL Classifier. r=francois
authorThomas Nguyen <tnguyen@mozilla.com>
Thu, 27 Oct 2016 18:16:26 +0800
changeset 319718 e1565fbf68350f99934fd3c675952dda2a46db72
parent 319717 1c508ae660233d0bcb1c231a7243af42f503f79b
child 319719 f668770cfb69bf698ad6ad59ca0fd3cdf1f60686
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1296802
milestone52.0a1
Bug 1296802 - remove LOAD_CLASSIFY_URI flag to prevent telemetry pings from running through the URL Classifier. r=francois MozReview-Commit-ID: 3xHBa7NnhgQ
toolkit/components/telemetry/TelemetrySend.jsm
--- a/toolkit/components/telemetry/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/TelemetrySend.jsm
@@ -902,16 +902,19 @@ var TelemetrySendImpl = {
 
     request.open("POST", url, true);
     request.overrideMimeType("text/plain");
     request.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
     request.setRequestHeader("Date", Policy.now().toUTCString());
 
     this._pendingPingRequests.set(id, request);
 
+    // Prevent the request channel from running though URLClassifier (bug 1296802)
+    request.channel.loadFlags &= ~Ci.nsIChannel.LOAD_CLASSIFY_URI;
+
     let startTime = new Date();
     let deferred = PromiseUtils.defer();
 
     let onRequestFinished = (success, event) => {
       let onCompletion = () => {
         if (success) {
           deferred.resolve();
         } else {