From 16c0d802860410233fecd6644ae3109cc5bf8b27 Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Tue, 27 Sep 2016 13:25:35 -0700 Subject: [PATCH] Bug 1302938 - Explain why user referrer trimming policy can be overriden. r=dragana MozReview-Commit-ID: GfmeIu2WEGX --HG-- extra : rebase_source : 386c056f51dd351e7713806cec2292f5a226e8ef --- netwerk/protocol/http/HttpBaseChannel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index c40c74d7ec7d..22ca752e4175 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -1522,6 +1522,9 @@ HttpBaseChannel::SetReferrerWithPolicy(nsIURI *referrer, referrerPolicy == REFERRER_POLICY_STRICT_ORIGIN || (isCrossOrigin && (referrerPolicy == REFERRER_POLICY_ORIGIN_WHEN_XORIGIN || referrerPolicy == REFERRER_POLICY_STRICT_ORIGIN_WHEN_XORIGIN))) { + // We can override the user trimming preference because "origin" + // (network.http.referer.trimmingPolicy = 2) is the strictest + // trimming policy that users can specify. userReferrerTrimmingPolicy = 2; }