On Fri, May 14, 2021 at 07:07:53PM +0200, Florian Obser wrote:
> oh, it's 204 no content. I missed that.
> The demo url (apparently running appache) doesn't return a
> Content-Lenght, either.
> 
> Anyway, trying to chunk encode an empty body is not going to work well.
> 
> This is making the spice flow again:

I confirm that this fixes upload from the nextcloud app for me as well.
There were also some occasional connection issues while browsing my
nextcloud instance with firefox. I'll have to wait and see if those are
now fixed. Server is running stock 6.9 with the patch below.

Should we also be including 1xx codes in the check added here?
In server_abort_http() there is this:
        if ((code >= 100 && code < 200) || code == 204)
                        clenheader = NULL;
Which matches https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1
  A server MUST NOT send a Transfer-Encoding header field in any
  response with a status code of 1xx (Informational) or 204 (No Content).

In any case, ok stsp@

> diff --git server_fcgi.c server_fcgi.c
> index 8d3b581568f..0ac80c27d11 100644
> --- server_fcgi.c
> +++ server_fcgi.c
> @@ -615,6 +615,10 @@ server_fcgi_header(struct client *clt, unsigned int code)
>       if (kv_add(&resp->http_headers, "Server", HTTPD_SERVERNAME) == NULL)
>               return (-1);
>  
> +     /* we cannot chunk-encode no-content */
> +     if (code == 204)
> +             clt->clt_fcgi.chunked = 0;
> +
>       /* Set chunked encoding */
>       if (clt->clt_fcgi.chunked) {
>               /* XXX Should we keep and handle Content-Length instead? */
> 
> 
> 
> > Cheerio,
> > Chris
> >
> 
> -- 
> I'm not entirely sure you are real.
> 
> 

Reply via email to