Project

General

Profile

Actions

Bug #14922

closed

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

Added by Arne Bippes over 19 years ago. Updated over 17 years ago.

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

0%

Estimated time:
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)


Files

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

Related issues 2 (0 open2 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
Actions #1

Updated by Sebastian Kurfuerst about 18 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

Actions

Also available in: Atom PDF