Fixed bug #11063: Wrong Content-length header breaks frontend output in some cases...
authorMichael Stucki <michael.stucki@typo3.org>
Wed, 13 May 2009 10:00:21 +0000 (10:00 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Wed, 13 May 2009 10:00:21 +0000 (10:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5407 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_fe.php

index 83bab39..e85abc0 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-13  Michael Stucki  <michael@typo3.org>
+
+       * Fixed bug #11063: Wrong Content-length header breaks frontend output in some cases (thanks to Georg Kuehnberger)
+
 2009-05-12  Patrick Broens  <patrick@patrickbroens.nl>
 
        * Fixed bug #11058: Validation issue: <input type="image"> can't have height and width attribute in typo3/alt_doc.php
index 44a2f5a..158da87 100644 (file)
@@ -3342,8 +3342,15 @@ if (version == "n3") {
                        }
                }
 
-                       // 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));
                }
        }