Actions
Bug #29699
closedt3lib_Compressor does not properly test for gzip support
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-09-12
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:
Description
Method returnFileReference() in t3lib_Compressor tests for browser support before actually allowing a CSS or JS compressed file to be returned to the client:
// if the client accepts gzip and we can create gzipped files, we give him compressed versions if ($this->createGzipped && strpos(t3lib_div::getIndpEnv('HTTP_ACCEPT_ENCODING'), 'gzip') !== FALSE) { return $filename . '.gzip'; } else { return $filename; }
This works fine from a BE perspective but fails in Frontend because the first client will trigger the caching framework and the result will be cached and reused for all following visits. If the first client supports gzip but the second one not, the site will be broken. If this is the other way around, then the download experience will be suboptimal.
Actions