[TYPO3-core] FYI72: #9947: gzip compression does not work in BE at all

Dmitry Dulepov dmitry at typo3.org
Mon Dec 15 10:25:14 CET 2008


Hi!

This is SVN patch request.

Type: bug

Branches: trunk, 4.2, 4.1

BT reference: http://bugs.typo3.org/view.php?id=9947

Problem: typo3/init.php includes class.gzip_compress.php but this is not enough. According to instructions in class.gzip_encode.php there must be another call, which is neither made, nor possible with BE architecture (it is not a problem in FE). Therefore compression never works. class.gzip_encode.php requires either a call to its constructor after output is completed (not possible with Backend modules) or "autoappend" PHP file, which is not possible either.

Solution: the solution is to use PHP built-in output compression handler, which is faster anyway. 

Notes: this patch sets compression level according to the documentation on the PHP site. Notice that we cannot use ini_set('zlib.output_compression'), it simply does not work from withing a file (but works from .htaccess). So I decided on ob_gzhandler(), which is old good proven working function. Additionally this bugfix will automatically fix http://bugs.typo3.org/view.php?id=3071 (positive side effect).

-- 
Dmitry Dulepov
TYPO3 core team
In the blog: http://typo3bloke.net/post-details/how_will_i_fix_bugs_in_extensions_from_now_on/
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9947.diff
Type: text/x-diff
Size: 983 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081215/34ec42cb/attachment.diff 


More information about the TYPO3-team-core mailing list