From fa51d7fbc67aa27b423c50c77b817514de6def09 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 2 Jul 2017 16:06:46 +0200 Subject: proc: do not declare empty process variables If a HTTP header variable has no corresponding value, then do not set it to the empty string but to NULL, so that cgi.c will later skip it when setting up the process environment. Signed-off-by: Jo-Philipp Wich --- proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc.c b/proc.c index 4819e08..a8a7142 100644 --- a/proc.c +++ b/proc.c @@ -162,7 +162,7 @@ struct env_var *uh_get_process_vars(struct client *cl, struct path_info *pi) cur = tb[proc_header_env[i].idx]; vars[i].name = proc_header_env[i].name; - vars[i].value = cur ? blobmsg_data(cur) : ""; + vars[i].value = cur ? blobmsg_data(cur) : NULL; } memcpy(&vars[i], extra_vars, sizeof(extra_vars)); -- cgit v1.2.3