Well, one server actually does have GZIP enabled (though there is no switch in the configuration tool); the other (a vanilla XAMPP) doesn’t. I checked both the conf files and did some curl’ing.
Here’s what phpinfo()
says:
Apache Version Apache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.20 mod_perl/2.0.8-dev Perl/v5.16.3
Loaded Modules core mod_so http_core prefork mod_authn_file mod_authn_dbm mod_authn_anon mod_authn_dbd mod_authn_socache mod_authn_core mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_dbm mod_authz_owner mod_authz_dbd mod_authz_core mod_authnz_ldap mod_access_compat mod_auth_basic mod_auth_form mod_auth_digest mod_allowmethods mod_file_cache mod_socache_shmcb mod_socache_dbm mod_socache_memcache mod_dbd mod_bucketeer mod_dumpio mod_echo mod_case_filter mod_case_filter_in mod_buffer mod_ratelimit mod_reqtimeout mod_ext_filter mod_request mod_include mod_filter mod_substitute mod_sed mod_charset_lite mod_mime util_ldap mod_log_config mod_log_debug mod_logio mod_env mod_mime_magic mod_cern_meta mod_expires mod_headers mod_usertrack mod_unique_id mod_setenvif mod_version mod_remoteip mod_proxy mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_fcgi mod_proxy_scgi mod_proxy_ajp mod_proxy_balancer mod_proxy_express mod_session mod_session_cookie mod_session_dbd mod_slotmem_shm mod_ssl mod_lbmethod_byrequests mod_lbmethod_bytraffic mod_lbmethod_bybusyness mod_lbmethod_heartbeat mod_unixd mod_dav mod_status mod_autoindex mod_info mod_suexec mod_cgi mod_cgid mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_php5 mod_perl
Here’s the response headers of a corrupt file (GZIP enabled via W3TC):
HTTP/1.1 200 OK
Date: Tue, 12 Jul 2016 07:10:48 GMT
Server: Apache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.20 mod_perl/2.0.8-dev Perl/v5.16.3
Vary: Accept-Encoding
X-Powered-By: PHP/5.6.20
Pragma: private
Last-Modified: Thu, 07 Jul 2016 13:25:58 GMT
Content-Length: 37162
Content-Encoding: gzip
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/css; charset=utf-8
And here’s the response of the following request
HTTP/1.1 200 OK
Date: Tue, 12 Jul 2016 07:12:32 GMT
Server: Apache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.20 mod_perl/2.0.8-dev Perl/v5.16.3
Vary: Accept-Encoding
Last-Modified: Tue, 12 Jul 2016 07:10:49 GMT
ETag: "912a-5376af7eb3040"
Accept-Ranges: bytes
Content-Length: 37162
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/css
Content-Encoding: gzip
Note: I have not enabled eTags, that’s Apache’s doing, which I can’t turn off for some reason.
This is the same file, with W3TC’s GZIP disabled:
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Length:243454
Content-Type:text/css
Date:Tue, 12 Jul 2016 07:35:25 GMT
ETag:"3b6fe-5376b12ae6280"
Keep-Alive:timeout=5, max=99
Last-Modified:Tue, 12 Jul 2016 07:18:18 GMT
Server:Apache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.20 mod_perl/2.0.8-dev Perl/v5.16.3