allow empty cgi.assign handler

git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@35 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Jan Kneschke 2005-02-20 19:05:55 +00:00
parent 04037134d5
commit 91066a8b60
1 changed files with 8 additions and 6 deletions

View File

@ -690,12 +690,14 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
#ifndef __WIN32
/* stat the exec file */
if (-1 == (stat(cgi_handler->ptr, &st))) {
log_error_write(srv, __FILE__, __LINE__, "sbss",
"stat for cgi-handler", cgi_handler,
"failed:", strerror(errno));
return -1;
if (cgi_handler->used > 1) {
/* stat the exec file */
if (-1 == (stat(cgi_handler->ptr, &st))) {
log_error_write(srv, __FILE__, __LINE__, "sbss",
"stat for cgi-handler", cgi_handler,
"failed:", strerror(errno));
return -1;
}
}
if (pipe(to_cgi_fds)) {