tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 6b22ca04d2a59a17cf16f14be82f61fb45391af9
parent f80917fcbd2be2aa692ec517bbe2054486f08d2d
Author: Valentin Gosu <valentin.gosu@gmail.com>
Date:   Fri, 12 Dec 2025 14:06:16 +0000

Bug 1976061 - Stop parsing Report-To header in NEL r=necko-reviewers,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D273220

Diffstat:
Mnetwerk/protocol/http/NetworkErrorLogging.sys.mjs | 15+++------------
1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/netwerk/protocol/http/NetworkErrorLogging.sys.mjs b/netwerk/protocol/http/NetworkErrorLogging.sys.mjs @@ -216,12 +216,7 @@ export class NetworkErrorLogging { policy.successful_sampling_rate = item.success_fraction || 0.0; policy.failure_sampling_rate = item.failure_fraction || 1.0; - // TODO: Remove these when no longer needed policy.nel = item; - let reportTo = JSON.parse( - aChannel.QueryInterface(Ci.nsIHttpChannel).getResponseHeader("Report-To") - ); - policy.reportTo = reportTo; // 15. If there is already an entry in the policy cache for (key, origin), replace it with policy; otherwise, insert policy into the policy cache for (key, origin). this.policyCache[String([key, origin])] = policy; @@ -387,16 +382,12 @@ export class NetworkErrorLogging { // nsINetworkErrorReport let retObj = { body: JSON.stringify(report_body), - group: policy.reportTo.group, + group: policy.nel.report_to, url, }; - if (policy && policy.reportTo.group === policy.nel.report_to) { - // nsHttpChannel will call ReportDeliver::Fetch - return retObj; - } - - return null; + // nsHttpChannel will call ReportDeliver::Fetch + return retObj; } QueryInterface = ChromeUtils.generateQI(["nsINetworkErrorLogging"]);