No, EVBUFFER_LENGTH(clt->clt_srvevb) will always be 8 for an
FCGI_END_REQUEST, see:
http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html#S5.5
(Assuming the fcgi server is well behaved).
On 2021-05-18 09:12 +02, Matthias Pressfreund <m...@fn.de> wrote:
> Hi Florian, isn't this what you actually wanted?
>
> Index: usr.sbin/httpd/server_fcgi.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v
> retrieving revision 1.86
> diff -u -p -u -p -r1.86 server_fcgi.c
> --- usr.sbin/httpd/server_fcgi.c        17 May 2021 09:26:52 -0000      1.86
> +++ usr.sbin/httpd/server_fcgi.c        18 May 2021 07:08:24 -0000
> @@ -616,7 +616,7 @@ server_fcgi_header(struct client *clt, u
>         if (kv_add(&resp->http_headers, "Server", HTTPD_SERVERNAME) == NULL)
>                 return (-1);
>
> -       if (clt->clt_fcgi.type == FCGI_END_REQUEST ||
> +       if (clt->clt_fcgi.type == FCGI_END_REQUEST &&
>             EVBUFFER_LENGTH(clt->clt_srvevb) == 0) {
>                 /* Can't chunk encode an empty body. */
>                 clt->clt_fcgi.chunked = 0;
>

-- 
I'm not entirely sure you are real.

Reply via email to