diff options
author | Alexandre Flament <alex@al-f.net> | 2021-06-02 17:28:17 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-09 18:08:23 +0200 |
commit | 92c8a8829f2e68e7ceb3b4670ebea4c4e6541a7c (patch) | |
tree | 6b57d8bdd58e00500d6196c5f9865dfb08fadfb1 /searx/utils.py | |
parent | 5c5db719d2039d34aa1426bf7eb3e57055d4a54a (diff) | |
download | searxng-92c8a8829f2e68e7ceb3b4670ebea4c4e6541a7c.tar.gz searxng-92c8a8829f2e68e7ceb3b4670ebea4c4e6541a7c.zip |
[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.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): |