Browse Source

[fix] strip spaces from searx user agent

h11 (used by httpx) rejects HTTP request with a trailing space in HTTP headers
Alexandre Flament 3 years ago
parent
commit
92c8a8829f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/utils.py

+ 1 - 1
searx/utils.py

@@ -45,7 +45,7 @@ def searx_useragent():
     """Return the searx User Agent"""
     """Return the searx User Agent"""
     return 'searx/{searx_version} {suffix}'.format(
     return 'searx/{searx_version} {suffix}'.format(
            searx_version=VERSION_STRING,
            searx_version=VERSION_STRING,
-           suffix=settings['outgoing']['useragent_suffix'].strip())
+           suffix=settings['outgoing']['useragent_suffix']).strip()
 
 
 
 
 def gen_useragent(os=None):
 def gen_useragent(os=None):