tor-browser

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

commit bf600905d4f6c85ba67e232635cbe3864b5a3acf
parent b5a1d0ac85783af43ebe690565459e76c47dddca
Author: Randell Jesup <rjesup@mozilla.com>
Date:   Wed, 15 Oct 2025 17:00:54 +0000

Bug 1994472: Strip Content-Encoding when saving a cache item that's a dictionary r=necko-reviewers,valentin

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

Diffstat:
Mnetwerk/protocol/http/HttpBaseChannel.cpp | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -1563,8 +1563,8 @@ HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener, } if (from.EqualsLiteral("dcb") || from.EqualsLiteral("dcz")) { MOZ_ASSERT(XRE_IsParentProcess()); - removeEncodings = true; } + removeEncodings = true; nextListener = converter; } else { if (val) { @@ -1584,9 +1584,9 @@ HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener, // if we need to remove any. // This double compression of course is silly, but supported by the spec. if (removeEncodings) { - // if we have dcb or dcz, all content-encodings in the header should - // be removed as we're decompressing before the tee in the parent - // process + // if we have dcb or dcz or if this is Use-As-Dictionary, all + // content-encodings in the header should be removed as we're + // decompressing before the tee in the parent process LOG(("Changing Content-Encoding from '%s' to ''", contentEncoding.get())); // Can't use SetHeader; we need to overwrite the current value rv = mResponseHead->SetHeaderOverride(nsHttp::Content_Encoding, ""_ns);