[TYPO3-core] RFC #9974: Use PHP built–in gzip/deflate compression in Frontend

Martin Kutschker masi-no at spam-typo3.org
Fri Dec 19 08:59:52 CET 2008


Dmitry Dulepov schrieb:
> Hi!
> 
> This is SVN patch request.
> 
> Type: feature
> 
> Branches: trunk
> 
> BT reference: http://bugs.typo3.org/view.php?id=9974
> 
> Problem: currently TYPO3 uses its own GZip compression class. This class was not changed for a long time and very few people know how it works. PHP includes its own output compression handler, which is not only faster but also maintained by PHP team and (!!!) supports "deflate" compression in addition to "gzip". We can only benefit from using this handler.
> 
> Solution: the attached patch changes TYPO3 Frontend to use PHP handler instead of TYPO3 own. It will also correct "Content-length" header generated by "config.enableContentLengthHeader=1".

There might be a problem: the callback handler may return FALSE in case
it doesn't want to change the content. I think this might happen, when
ob_gzhandler detects that the client cannot handle transfer compression.

Masi

PS: Since you created a special handler to correct the content-lenght
header I wonder why you didn't use the PHP class as a fallback if the
PHP extension isn't available.


More information about the TYPO3-team-core mailing list