For the record: I tested this on a WordPress instance and it fixed the problem for me. It was also visible in roundcubemail and wikimedia (firefox and safari showed the issue, chrome on the company laptop did not).
Thanks Florian! Paul On Wed, May 19, 2021 at 08:44:47PM +0200, 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. | -- >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+ +++++++++++>-]<.>++[<------------>-]<+.--------------.[-] http://www.weirdnet.nl/