Bug #65719
closedFE content-length header set too early
100%
Description
With 6.2, sending content-length header was enabled by default via config.enableContentLengthHeader considered as "on".
This is done in TSFE->processOutput. Unfortunately, there are a couple of things calculated after this header length is set - and some of those tend to change the output and thus its length afterward. Most prominently the eofe hook. If so, the content length will is set to a wrong value and some webservers or proxies stumble upon that - eg. varnish is a bit picky if header length and actual length differ.
Maybe possible solution: Move the header sending out of processOutput to a later point in TSFE processing - maybe directly before the echo out? That would be more clean and all the "disable if debug and disable if beUserLogin" and all this stuff would be obsolete.