summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-07-02 16:06:46 +0200
committerJo-Philipp Wich <jo@mein.io>2017-07-02 16:06:46 +0200
commitfa51d7fbc67aa27b423c50c77b817514de6def09 (patch)
treef3a181c61637b145b6f4d7cb2ff0eb24fac9ef19
parenta8bf9c00842224edb394e79909053f7628ee6a82 (diff)
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 <jo@mein.io>
-rw-r--r--proc.c2
1 files changed, 1 insertions, 1 deletions
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));