summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-06-02 17:28:17 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2021-06-09 18:08:23 +0200
commit92c8a8829f2e68e7ceb3b4670ebea4c4e6541a7c (patch)
tree6b57d8bdd58e00500d6196c5f9865dfb08fadfb1 /searx/utils.py
parent5c5db719d2039d34aa1426bf7eb3e57055d4a54a (diff)
[fix] strip spaces from searx user agent
h11 (used by httpx) rejects HTTP request with a trailing space in HTTP headers
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/utils.py b/searx/utils.py
index bf9957df..28554604 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):