From ce19e9fae38d1cfad257c1cd8bddbddbc2d68251 Mon Sep 17 00:00:00 2001 From: Brock Vojkovic Date: Wed, 16 Sep 2026 22:23:11 +0800 Subject: [PATCH] [fix] image_proxy compressed images (#6730) Prevents the image proxy from decompressing brotli/gzip in transit. See: https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html Setting accept_encoding to none prevents curl from automatically decompressing the received contents. Signed-off-by: vojkovic --- searx/network/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/searx/network/__init__.py b/searx/network/__init__.py index 2257bcd31..243d746cd 100644 --- a/searx/network/__init__.py +++ b/searx/network/__init__.py @@ -201,6 +201,8 @@ def delete(url: str, **kwargs: t.Any) -> SXNG_Response: async def stream_chunk_to_queue(network, queue, method: str, url: str, **kwargs: t.Any): try: + # prevent curl from decompressing the response https://github.com/searxng/searxng/pull/6730 + kwargs.setdefault('accept_encoding', None) async with await network.stream(method, url, **kwargs) as response: queue.put(response) async for chunk in response.aiter_content():