+2004-12-20 Kasper Skårhøj,,, <kasper@typo3.com>
+
+ * Changed "config.disableContentLengthHeader" over to "enableContentLengthHeader" because a default content-length header might introduce some weird and hard-to-debug situation for people.
+
2004-12-20 Kasper Skårhøj,,, <kasper@typo3.com>
* Added possibility to enable cache-control headers on frontend output; This allows a site to be cached by client browsers and proxies. See TSref for configuration ("config.sendCacheHeaders")
* Added that a cache-control header sent from client can regenerate an otherwise cached page. In reality this means that a shift-reload click in the browser will always circumvent TYPO3s page-cache, regenerate the page and store a new version in cache if applicable. If anyone has objections agains this default feature (eg. fear of DoS attacks), please bring up a discussion on dev-list.
$this->content = str_replace('target=_top','target="_self"',$this->content);
}*/
- // If no external scripts should be included we can safely send a content-length header:
- if (!$this->isEXTincScript() && !$this->config['config']['disableContentLengthHeader']) {
+ // 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) {
header('Content-Length: '.strlen($this->content));
}
}