Bug #20413
closedwrong content-length header breaks frontend in case of proxy-usage
0%
Description
class.tslib_fe.php, function processOutput() calculates the content-length wrongly in case of enabled debug.
In case of config.debug = 1 or $TYPO3_CONF_VARS['FE']['debug'] = '1'; the calculated content-length will differ from the really sent content-length;
basically the calculation misses the "Cached page generated ...Expires ... text below the closing html tag.
Now in case of using a forwarding or reverse Proxy like Squid (2.7), the proxy will choke upon the difference of content-length information from the header and the really delivered content-length with an Error like this: httpReadReply: Excess data from "GET http://domain.com/123.html"
Even worse the Proxy will NOT deliver the complete page but will cut it off somewhere in the middle (observed with pages larger than 30.000 bytes).
Thus I percieve this as a severe bug, as turning on the "debug" feature should not break the frontend.
Solution: In case debug is activated, TYPO3 should not send content-length at all; proxies will behave nice then and deliver the complete page.
Patch: Simply added two more conditions to class.tslib_fe.php, function processOutput()
Note: You should not trust the Firefox Page-Size-Information (Extras > Information > Page-Size); FF seems to ignore everything behind the closing html tag, and thus report a wrong document-size.
(issue imported from #M11063)
Files
Updated by Georg Kühnberger over 15 years ago
Updated by Michael Stucki over 15 years ago
Fixed in TYPO3 4.2.7 and later. Thanks Georg!