diff options
author | Omar Polo <op@omarpolo.com> | 2020-11-06 18:02:41 +0100 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2020-11-06 18:02:41 +0100 |
commit | f65ed01841f4603f861bed55224227501f56372b (patch) | |
tree | 89a56ed372429d317c1459884e185026ca6fa1da | |
parent | 120381c93d65a860f38bc5e1541b1c00ff959124 (diff) |
[cgi] set QUERY_STRING only if there is a query string
-rw-r--r-- | gmid.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -417,7 +417,8 @@ start_cgi(const char *path, const char *query, setenv("SERVER_PORT", "1965", 1); setenv("PATH_INFO", path, 1); setenv("PATH_TRANSLATED", expath, 1); - setenv("QUERY_STRING", query ? query : "", 1); + if (query != NULL) + setenv("QUERY_STRING", query, 1); setenv("REMOTE_ADDR", addr, 1); execvp(expath, argv); |