Bug #14922

TYPO3_CONF_VARS['FE']['compressionLevel'] = true leads to no compression with wrong Content-Length

Added by Arne Bippes over 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-08-11
Due date:
% Done:

0%

TYPO3 Version:
3.8.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In constructor gzip_encode line 168 the compression level is compared (identical: $level === true). If $level is set using the Install Tool $level is a string 'true' therefore the comparison fails and gzcompress is called with string 'true'
Needed Changes:
- do a string comparison: if (strcmp($level,'true') == 0 )
- check $level for Integer in the range from 0 to 9 otherwise set default

appended diff -u contains also some extra headers about compression size - not needed but interesting ...

My System:
Linux p15167410 2.6.7-040722 #1 SMP Thu Jul 22 21:41:08 CEST 2004 i686 i686 i386 GNU/Linux
PHP 4.3.4 (cli) (built: Apr 22 2005 15:31:00)
Apache2
(issue imported from #M1370)

class.gzip_encode.php.diff View (772 Bytes) Administrator Admin, 2005-08-11 23:50


Related issues

Related to TYPO3 Core - Bug #15337: Wrong Content-Length header implement in TSFE Closed 2005-12-30
Related to TYPO3 Core - Bug #19715: Content-length header is calculated incorrectly Closed 2008-12-18

History

#1 Updated by Sebastian Kurfuerst about 13 years ago

I checked this bug and in current TYPO3 svn, the problem is not there anymore, see the snippet:

$this->encoding = $encoding;

if (strtolower($level)  'true' || $level = true) {
$level = $this->get_complevel();
}
$this->level = $level;

Greets, Sebastian

Also available in: Atom PDF