mirror of https://github.com/omar-polo/gmid.git
[cgi] set QUERY_STRING only if there is a query string
This commit is contained in:
parent
120381c93d
commit
f65ed01841
3
gmid.c
3
gmid.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue