[mod_cgi] always set QUERY_STRING (fixes #1339)
(thx alexo) x-ref: "lighttpd doesn't set empty QUERY_STRING in cgi environment" https://redmine.lighttpd.net/issues/1339
This commit is contained in:
parent
97556d992b
commit
f1681ca29b
1
NEWS
1
NEWS
|
@ -63,6 +63,7 @@ NEWS
|
|||
* [stream] fstat() after open() to obtain file size
|
||||
* [core] clean up srv before exiting for lighttpd -[vVh]
|
||||
* [mod_fastcgi,mod_scgi] check for spawning on same unix socket (fixes #319)
|
||||
* [mod_cgi] always set QUERY_STRING (fixes #1339)
|
||||
|
||||
- 1.4.39 - 2016-01-02
|
||||
* [core] fix memset_s call (fixes #2698)
|
||||
|
|
|
@ -956,6 +956,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
|
|||
cgi_env_add(&env, CONST_STR_LEN("REDIRECT_STATUS"), CONST_STR_LEN("200"));
|
||||
if (!buffer_string_is_empty(con->uri.query)) {
|
||||
cgi_env_add(&env, CONST_STR_LEN("QUERY_STRING"), CONST_BUF_LEN(con->uri.query));
|
||||
} else {
|
||||
cgi_env_add(&env, CONST_STR_LEN("QUERY_STRING"), CONST_STR_LEN(""));
|
||||
}
|
||||
if (!buffer_string_is_empty(con->request.orig_uri)) {
|
||||
cgi_env_add(&env, CONST_STR_LEN("REQUEST_URI"), CONST_BUF_LEN(con->request.orig_uri));
|
||||
|
|
Loading…
Reference in New Issue