From 92c8a8829f2e68e7ceb3b4670ebea4c4e6541a7c Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Wed, 2 Jun 2021 17:28:17 +0200 Subject: [PATCH] [fix] strip spaces from searx user agent h11 (used by httpx) rejects HTTP request with a trailing space in HTTP headers --- searx/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/utils.py b/searx/utils.py index bf9957df4..285546043 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -45,7 +45,7 @@ def searx_useragent(): """Return the searx User Agent""" return 'searx/{searx_version} {suffix}'.format( searx_version=VERSION_STRING, - suffix=settings['outgoing']['useragent_suffix'].strip()) + suffix=settings['outgoing']['useragent_suffix']).strip() def gen_useragent(os=None):