[TYPO3-core] RFC: #11063: wrong content-length header breaks frontend in case of proxy-usage
georg kuehnberger
georg at georg.org
Mon May 11 13:43:44 CEST 2009
This is a SVN patch request.
Type: bugfix
BT Reference: http://bugs.typo3.org/view.php?id=11063
Branches: trunk & elder
Problem:
class.tslib_fe.php, function processOutput() calculates the
content-length wrongly in case of enabled debug. this leads proxies to
not deliver the complete page, but cut it off in the middle of nowhere.
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 provided: Simply added two more conditions to class.tslib_fe.php,
function processOutput()
Has patch: yes
regards georg
Index: typo3/sysext/cms/tslib/class.tslib_fe.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 5403)
+++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy)
@@ -3342,8 +3342,15 @@
}
}
- // Send content-lenght header. Notice that all HTML content outside
the length of the content-length header will be cut off! Therefore
content of unknown length from included PHP-scripts and if admin users
are logged in (admin panel might show...) we disable it!
- if ($this->config['config']['enableContentLengthHeader'] &&
!$this->isEXTincScript() && !$this->beUserLogin &&
!$this->doWorkspacePreview()) {
+ // Send content-lenght header.
+ // Notice that all HTML content outside the length of the
content-length header will be cut off! Therefore content of unknown
length from included PHP-scripts and if admin users are logged in (admin
panel might show...) or if debug mode is turned on we disable it!
+ if ($this->config['config']['enableContentLengthHeader'] &&
+ !$this->isEXTincScript() &&
+ !$this->beUserLogin &&
+ !$this->TYPO3_CONF_VARS['FE']['debug'] &&
+ !$this->config['config']['debug'] &&
+ !$this->doWorkspacePreview()
+ ) {
header('Content-Length: '.strlen($this->content));
}
}
More information about the TYPO3-team-core
mailing list