Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] image_proxy compressed images (#6730)

Brock Vojkovicce19e9fae38d
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():