Can you try Matthias' patch from the other mail please? This is better and seems to fix the nextcloud app for me. This is on top of my patch.
--- usr.sbin/httpd/server_fcgi.c Thu May 20 05:57:23 2021 +++ usr.sbin/httpd/server_fcgi.c Thu May 20 06:03:40 2021 @@ -620,6 +620,12 @@ EVBUFFER_LENGTH(clt->clt_srvevb) == 0) { /* Can't chunk encode an empty body. */ clt->clt_fcgi.chunked = 0; + key.kv_key = "Content-Length"; + if ((kv = kv_find(&resp->http_headers, &key)) == NULL) { + if (kv_add(&resp->http_headers, + "Content-Length", "0") == NULL) + return (-1); + } } /* Set chunked encoding */ @@ -636,13 +642,6 @@ if (kv_add(&resp->http_headers, "Transfer-Encoding", "chunked") == NULL) return (-1); - } else { - key.kv_key = "Content-Length"; - if ((kv = kv_find(&resp->http_headers, &key)) == NULL) { - if (kv_add(&resp->http_headers, - "Content-Length", "0") == NULL) - return (-1); - } } /* Is it a persistent connection? */ On 2021-05-19 23:07 -06, Steve Williams <st...@williamsitconsulting.com> wrote: > Hi, > > Now that I have my head out of my ass (php/redis issue), I can confirm > that the Nextcloud Android client does NOT work with this latest patch > for me. > > I am getting the same "Connection Error" that I do with the stock > httpd that's supplied in 6.9. I am running Nextcloud Andriod client > version 3.16 released May 5, 2021. > > Wordpress, Nextcloud, Piwigo (photo album) are all working in Chrome > and Firefox. > > > I extracted /usr/src/usr.sbin/httpd > > cd /usr/src/usr.sbin/httpd > # I copied & pasted the few lines from the email into a file "p" > patch < p > make > make install > #sledgehammer used below :) > rcctl restart httpd php74_fpm redis mysqld > > If there's anything I can do to assist, please let me know. > > Cheers, > Steve W. > > On 19/05/2021 9:59 p.m., Steve Williams wrote: >> Hi, >> >> I applied this patch to the base OpenBSD 6.9 httpd source tree, >> recompiled & installed. >> >> Wordpress works in both Firefox and Chrome, Roundcubemail works in >> both Firefox and Chrome. >> >> However, my Andriod Nextcloud client is now broken again. I get a >> "Connection Error". >> >> Is there a way I can help you troubleshoot this? >> >> There is nothing significant when I run a httpd -d -v -v -v -v -v >> >> Thanks, >> Steve Williams >> >> >> On 19/05/2021 12:44 p.m., Florian Obser wrote: >>> The whole point of using Transfer-Encoding: chunked for fastcgi was so >>> that we do not need to provide a Content-Length header if upstream >>> doesn't give us one. (We'd need to slurp in all the data ugh). >>> >>> Now turns out that if we disable chunked encoding for zero sized bodies >>> some browsers are picky and want a Content-Length: 0 (Firefox, Safari) >>> or they'll just sit there and wait for the connection to close. >>> >>> Problem reported by Matthias Pressfreund with wordpress. >>> Debugged with the help of weerd@ who pointed out that the problem is >>> actually browser dependent. From there it was pretty clear what the >>> problem was. >>> >>> OK? >>> >>> diff --git server_fcgi.c server_fcgi.c >>> index 31d7322e9f7..b9dc4f6fe04 100644 >>> --- server_fcgi.c >>> +++ server_fcgi.c >>> @@ -636,6 +636,13 @@ server_fcgi_header(struct client *clt, >>> unsigned int code) >>> if (kv_add(&resp->http_headers, >>> "Transfer-Encoding", "chunked") == NULL) >>> return (-1); >>> + } else { >>> + key.kv_key = "Content-Length"; >>> + if ((kv = kv_find(&resp->http_headers, &key)) == NULL) { >>> + if (kv_add(&resp->http_headers, >>> + "Content-Length", "0") == NULL) >>> + return (-1); >>> + } >>> } >>> /* Is it a persistent connection? */ >>> > -- I'm not entirely sure you are real.