Project

General

Profile

Actions

Bug #20413

closed

wrong content-length header breaks frontend in case of proxy-usage

Added by Georg Kühnberger over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2009-05-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

bug_11063.diff (1.18 KB) bug_11063.diff Administrator Admin, 2009-05-10 02:55

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #15337: Wrong Content-Length header implement in TSFEClosed2005-12-30

Actions
Related to TYPO3 Core - Bug #19715: Content-length header is calculated incorrectlyClosed2008-12-18

Actions
Related to TYPO3 Core - Feature #19717: Use PHP built–in gzip/deflate compression in FrontendClosedDmitry Dulepov2008-12-18

Actions
Actions #1

Updated by Georg Kühnberger over 15 years ago

uploaded corrected unified diff

Actions #2

Updated by Georg Kühnberger over 15 years ago

the bug is somewhat related to #19715 #19715 and #19715 - however I dont want to wait for those, but like to see this issue being fixed in the next 4.3 release

Actions #3

Updated by Michael Stucki over 15 years ago

Fixed in TYPO3 4.2.7 and later. Thanks Georg!

Actions

Also available in: Atom PDF