Selaa lähdekoodia

[fix] robot tests ++ set default value for server http protocol version

Adam Tauber 8 vuotta sitten
vanhempi
commit
14f58bdaec
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1
    0
      searx/settings_robot.yml
  2. 1
    1
      searx/webapp.py

+ 1
- 0
searx/settings_robot.yml Näytä tiedosto

13
     secret_key : "ultrasecretkey" # change this!
13
     secret_key : "ultrasecretkey" # change this!
14
     base_url : False
14
     base_url : False
15
     image_proxy : False
15
     image_proxy : False
16
+    http_protocol_version : "1.0"
16
 
17
 
17
 ui:
18
 ui:
18
     themes_path : ""
19
     themes_path : ""

+ 1
- 1
searx/webapp.py Näytä tiedosto

81
 
81
 
82
 # serve pages with HTTP/1.1
82
 # serve pages with HTTP/1.1
83
 from werkzeug.serving import WSGIRequestHandler
83
 from werkzeug.serving import WSGIRequestHandler
84
-WSGIRequestHandler.protocol_version = "HTTP/{}".format(settings['server']['http_protocol_version'])
84
+WSGIRequestHandler.protocol_version = "HTTP/{}".format(settings['server'].get('http_protocol_version', '1.0'))
85
 
85
 
86
 static_path, templates_path, themes =\
86
 static_path, templates_path, themes =\
87
     get_themes(settings['ui']['themes_path']
87
     get_themes(settings['ui']['themes_path']