[mod_cgi] fix out of sockets error for POST to CGI (fixes #2771)

(thx asifgoldpk)

x-ref:
  "With mod_cgi I am getting sockets disabled, out-of-fds error"
  https://redmine.lighttpd.net/issues/2771
personal/stbuehler/mod-csrf
Glenn Strauss 7 years ago
parent 40e05e9b8c
commit 99925202dd

@ -1028,6 +1028,7 @@ static int cgi_write_request(server *srv, handler_ctx *hctx, int fd) {
/* sent all request body input */
/* close connection to the cgi-script */
if (-1 == hctx->fdtocgi) { /*(received request body sent in initial send to pipe buffer)*/
--srv->cur_fds;
if (close(fd)) {
log_error_write(srv, __FILE__, __LINE__, "sds", "cgi stdin close failed ", fd, strerror(errno));
}

Loading…
Cancel
Save