mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[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
This commit is contained in:
@@ -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"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user