From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 29 May 2020 07:09:38 +0000 (+0200)
Subject: Add 'no-brotli-accepted' filter which prevents the unsupported Brotli compression
X-Git-Tag: v_3_0_29~379
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/user-manual/static/gitweb.js?a=commitdiff_plain;h=6774c229e7ebe2a80f1648a94f6666b60c92b859;p=privoxy.git

Add 'no-brotli-accepted' filter which prevents the unsupported Brotli compression
---

diff --git a/default.action.master b/default.action.master
index 24d62e7a..728753a4 100644
--- a/default.action.master
+++ b/default.action.master
@@ -187,6 +187,7 @@
 #    Client-header filters predefined in the supplied default.filter include:
 #
 #     hide-tor-exit-notation: Removes the Tor exit node notation in Host and Referer headers.
+#     no-brotli-accepted:     Strips "br" from the Accept-Encoding header
 #     privoxy-control:        Removes X-Privoxy-Control headers.
 #
 # +client-header-tagger{string}
diff --git a/default.filter b/default.filter
index 548befe6..6288488b 100644
--- a/default.filter
+++ b/default.filter
@@ -743,6 +743,16 @@ CLIENT-HEADER-FILTER: hide-tor-exit-notation Removes the Tor exit node notation
 
 s@^((?:Referer|Host):\s*(?:https?://)?[^/]*)\.[^\./]*?\.exit@$1@i
 
+#################################################################################
+#
+# no-brotli-accepted: Strips "br" from the Accept-Encoding header as Privoxy
+#                     currently doesn't support Brotli.
+#
+#################################################################################
+CLIENT-HEADER-FILTER: no-brotli-accepted Strip "br" from Accept-Encoding header
+
+s@(^Accept-Encoding:.*?)(?:br, |, br|br)@$1@i
+
 #################################################################################
 #
 # less-download-windows: Prevents annoying download windows for content types