> On 12 Aug 2022, at 13:12, Claudio Jeker <[email protected]> wrote:
>
> On Thu, Aug 11, 2022 at 02:00:39PM +0300, Alexey Vatchenko wrote:
>>
>> I’m getting complains that the problem returned.
>>
>> But I haven’t applied patch for slowcgi. Is it mandatory? I believe it
>> shouldn’t.
>>
>> As I mentioned earlier, sometime the client is fast enough to make new
>> request before slowcgi daemon closes connection triggering
>> server_file_error() with EOF (or server_fcgi_error() in your case). So, our
>> goal to get to server_read_http() with reset client structure.
>
> I think you need this diff on top of all what is in -current.
Applied on prod again. Waiting :)
> itself. httpd misses some basic abstractions.
Agree!
> Index: server_fcgi.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v
> retrieving revision 1.93
> diff -u -p -r1.93 server_fcgi.c
> --- server_fcgi.c 12 Aug 2022 08:40:25 -0000 1.93
> +++ server_fcgi.c 12 Aug 2022 10:01:30 -0000
> @@ -584,11 +584,23 @@ server_fcgi_read(struct bufferevent *bev
> ((struct http_descriptor *)
> clt->clt_descreq)->http_method
> == HTTP_METHOD_HEAD)
> - break;
> - if (server_fcgi_writechunk(clt) == -1) {
> + /* nothing */ ;
> + else if (server_fcgi_writechunk(clt) == -1) {
> server_abort_http(clt, 500,
> "encoding error");
> return;
> + }
> + if (clt->clt_fcgi.type == FCGI_END_REQUEST) {
> + bufferevent_enable(clt->clt_bev,
> + EV_READ|EV_WRITE);
> + if (clt->clt_persist)
> + clt->clt_toread =
> + TOREAD_HTTP_HEADER;
> + else
> + clt->clt_toread =
> + TOREAD_HTTP_NONE;
> + clt->clt_done = 0;
> + server_reset_http(clt);
> }
> break;
> }