From 3f683799a897c086cfcee7ac23ce070d11996f59 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 25 Jun 2020 10:45:49 +0200 Subject: [PATCH] improve 'debug' parameter instead of checking on '1' or 'true', check that it is there and not '0' and 'false'. this allows using simply https://foo:8007/?debug instead of https://foo:8007/?debug=1 Signed-off-by: Dominik Csapak --- src/server/rest.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/rest.rs b/src/server/rest.rs index 95f73191..14e78d60 100644 --- a/src/server/rest.rs +++ b/src/server/rest.rs @@ -323,7 +323,7 @@ fn get_index(username: Option, token: Option, template: &Handleb if let Some(query_str) = parts.uri.query() { for (k, v) in form_urlencoded::parse(query_str.as_bytes()).into_owned() { - if k == "debug" && v == "1" || v == "true" { + if k == "debug" && v != "0" && v != "false" { debug = true; } }