boxesserver: don't error out on missing QUERY_STRING
This commit is contained in:
parent
024b574763
commit
b4384f5d16
|
@ -442,10 +442,10 @@ class BServer:
|
||||||
status = '200 OK'
|
status = '200 OK'
|
||||||
headers = [('Content-type', 'text/html; charset=utf-8'), ('X-XSS-Protection', '1; mode=block'), ('X-Content-Type-Options', 'nosniff'), ('x-frame-options', 'SAMEORIGIN'), ('Referrer-Policy', 'no-referrer')]
|
headers = [('Content-type', 'text/html; charset=utf-8'), ('X-XSS-Protection', '1; mode=block'), ('X-Content-Type-Options', 'nosniff'), ('x-frame-options', 'SAMEORIGIN'), ('Referrer-Policy', 'no-referrer')]
|
||||||
|
|
||||||
d = parse_qs(environ['QUERY_STRING'])
|
d = parse_qs(environ.get('QUERY_STRING', ''))
|
||||||
name = environ["PATH_INFO"][1:]
|
name = environ["PATH_INFO"][1:]
|
||||||
args = [unquote_plus(arg) for arg in
|
args = [unquote_plus(arg) for arg in
|
||||||
environ['QUERY_STRING'].split("&")]
|
environ.get('QUERY_STRING', '').split("&")]
|
||||||
|
|
||||||
lang = self.getLanguage(args, environ.get("HTTP_ACCEPT_LANGUAGE", ""))
|
lang = self.getLanguage(args, environ.get("HTTP_ACCEPT_LANGUAGE", ""))
|
||||||
_ = lang.gettext
|
_ = lang.gettext
|
||||||
|
|
Loading…
Reference in New Issue