correctly handle an abnormal fastcgi termination. httpd handles the
authorop <op@openbsd.org>
Thu, 11 Aug 2022 14:25:22 +0000 (14:25 +0000)
committerop <op@openbsd.org>
Thu, 11 Aug 2022 14:25:22 +0000 (14:25 +0000)
commit193f358a192419466a04766a993921703e965df7
tree40a44a82a3bf866cb240f81711bad1a21494144d
parent66df50620a8ad95aa9b27c02d5139627bb37f14a
correctly handle an abnormal fastcgi termination.  httpd handles the
disconnection from the fastcgi application via server_file_error which
assumes that the reply was completey done.  However, if the fastcgi
reply wasn't complete (e.g. because slowcgi hit the timeout) the HTTP
client are left "hanging" and waiting for a reply until they give up.

This adds a server_fcgi_error callback to handle the "no headers" and
"incomplete data" cases and properly close the reply before falling back
to server_file_error.

OK claudio@
usr.sbin/httpd/server_fcgi.c