summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-08-12 03:11:20 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-08-12 03:11:20 -0400
commit85325d9c1954695c826e61c05b46c8e4cf7362a6 (patch)
tree73b0b0ec26a049e9f61bb7f8854abbe8c65a7ba7
parent8228273473a9feb804e813d3160d4b46c38eb3b1 (diff)
downloadlighttpd1.4-85325d9c1954695c826e61c05b46c8e4cf7362a6.tar.gz
lighttpd1.4-85325d9c1954695c826e61c05b46c8e4cf7362a6.zip
[mod_cgi] fix bug to properly exec interpreter
fix bug to properly exec interpreter when cgi handler is set (thx stbuehler)
-rw-r--r--src/mod_cgi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_cgi.c b/src/mod_cgi.c
index 6df103b7..a2c90bd5 100644
--- a/src/mod_cgi.c
+++ b/src/mod_cgi.c
@@ -839,7 +839,7 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, handler_
log_error_write(srv, __FILE__, __LINE__, "ssb", "open dirname failed:", strerror(errno), con->physical.path);
}
- hctx->pid = (dfd >= 0) ? fdevent_fork_execve(con->physical.path->ptr, args, env.ptr, to_cgi_fds[0], from_cgi_fds[1], -1, dfd) : -1;
+ hctx->pid = (dfd >= 0) ? fdevent_fork_execve(args[0], args, env.ptr, to_cgi_fds[0], from_cgi_fds[1], -1, dfd) : -1;
for (size_t i = 0; i < env.used; ++i) free(env.ptr[i]);
free(env.ptr);