From 896863802e0d14b1d7003b442a842317a0272b0f Mon Sep 17 00:00:00 2001 From: Guanzhong Chen Date: Wed, 17 Dec 2025 03:39:03 -0500 Subject: [PATCH] [fix] engine: brave - BrotliDecoderDecompressStream encoding issue (#5572) For some reason, I keep getting this error from the brave engine: httpx.DecodingError: BrotliDecoderDecompressStream failed while processing the stream Forcing the server to use either gzip or deflate fixes this issue. This makes the brave engine work when the server seems to be encoding brotli incorrectly, or at least in a way incompatible with certain installs. Related: - https://github.com/searxng/searxng/pull/1787 - https://github.com/searxng/searxng/pull/5536 --- searx/engines/brave.py | 1 + 1 file changed, 1 insertion(+) diff --git a/searx/engines/brave.py b/searx/engines/brave.py index a19046b77..3b8962625 100644 --- a/searx/engines/brave.py +++ b/searx/engines/brave.py @@ -214,6 +214,7 @@ def request(query: str, params: dict[str, t.Any]) -> None: if brave_category == "goggles": args["goggles_id"] = Goggles + params["headers"]["Accept-Encoding"] = "gzip, deflate" params["url"] = f"{base_url}{brave_category}?{urlencode(args)}" logger.debug("url %s", params["url"])