[mod_cgi] fix detection of failing error handler (fixes #3157)

(thx sparlane)

failing error handler produced no output and POLLRDHUP received with
POLLIN.

commit dd23fcb2 changed return value from HANDER_FINISHED to
HANDLER_GO_ON when introducing cgi_process_rd_revents(), and POLLRDHUP
case which previously fell through needed to continue to return
HANDLER_FINISHED after calling cgi_connection_close()

x-ref:
  "fall-back with cgi error handler no longer works"
  https://redmine.lighttpd.net/issues/3157
master
Glenn Strauss 7 months ago
parent f314d2cbb9
commit 467fb2bfb7
  1. 1
      src/mod_cgi.c

@ -639,6 +639,7 @@ static handler_t cgi_process_rd_revents(handler_ctx * const hctx, request_st * c
if (0 == r->http_status) r->http_status = 200; /* OK */
}
cgi_connection_close(hctx);
return HANDLER_FINISHED;
} else if (revents & FDEVENT_ERR) {
/* kill all connections to the cgi process */
cgi_connection_close(hctx);

Loading…
Cancel
Save