Cache route doesn't check if compression of cached page is disabled or if browser accepts gzip.
In cacheroute.inc
184 if (function_exists('gzencode')) {
185 header('Content-Encoding: gzip');
186 }
I suspect it should be something like the following in include/bootstrap.inc
618 if (variable_get('page_compression', TRUE)) {
619 // Determine if the browser accepts gzipped data.
620 if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === FALSE && function_exists('gzencode')) {
621 // Strip the gzip header and run uncompress.
622 $cache->data = gzinflate(substr(substr($cache->data, 10), 0, -8));
623 }
624 elseif (function_exists('gzencode')) {
625 header('Content-Encoding: gzip');
626 }
627 }
I wish I had the time and knowledge to fix it, but I don't.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | cacherouter_gzip.patch | 1.85 KB | nick_vh |
Comments
Comment #1
nick_vhFixed the compression check on the gzip.
Problem was that in the cache I couldn't check the variables so I checked if the content was gzipped or not.
I still need to test all the cache cases for this module but it seems to work for now, also if the browser doesn't support gzip compression it won't send the content compressed.
Comment #2
slantview commentedCommitted in http://drupal.org/cvs?commit=150114
Thanks.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.