From: Jo-Philipp Wich Date: Sun, 2 Jul 2017 14:06:46 +0000 (+0200) Subject: proc: do not declare empty process variables X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=fa51d7fbc67aa27b423c50c77b817514de6def09;p=project%2Fuhttpd.git 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 --- 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));