Преглед на файлове

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

Adam Tauber преди 8 години
родител
ревизия
14f58bdaec
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 1
    0
      searx/settings_robot.yml
  2. 1
    1
      searx/webapp.py

+ 1
- 0
searx/settings_robot.yml Целия файл

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 Целия файл

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']