Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
From changelog for 4.5:
"* added support for sending gzip compressed pages."
But I don`t get how it swich on. Does it works?
Searching drupal.org doesn`t help me.
So, I`ve made a small patch.
Comment | File | Size | Author |
---|---|---|---|
gzip.patch.tar.bz2 | 6.7 KB | Nick@drupal.ru |
Comments
Comment #1
Bèr Kessels CreditAttribution: Bèr Kessels commentedSmall patch, looks nice.
but please, do not tar or zip your patches. That makes them hard to read, or try.
Bèr
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThe comment in the release statement was referring to cached pages which are stored and sent as gzipped html.
I do not understand why we'd need your patch for sendign all content gzipped. Adding the relevant lines to the .htaccess file should suffice.
Comment #3
Nick@drupal.ru CreditAttribution: Nick@drupal.ru commentedOh... It`s doen`t work with cache enabled.
killes, hm...
when I just add
zlib.output_compression On
in .htaccess, compression works, but there is nothing about compression in headers (for authenticated users, not anonymous), so html-page has broken. Thats why I`ve tried to make this patch
Now I see, that compression works by default, but only for cache data (in 4.5).
And, probably, when
zlib.output_compression On
cache data compress twice.
I just want, all data to be compressed.
So, my patch works if only cache disabled.
Sorry.
Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI think that zlib.output compression should check if the output is already compressed. Drupal does send the right headers, I think.
mod_gzip works fine with Drupal's compressed cache.