1

it's very strage, i google a problem with no luck at all. i have 2 servers (centos6, apache2.2). apache configuration is totally the same (i sure, apache configured by puppet)

my deflate.conf:

AddOutputFilterByType DEFLATE text/html text/plain text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript text/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/json

when i curl -I --compressed http://web1.tld/file.css i get following responce:

HTTP/1.1 200 OK
Date: Fri, 19 Sep 2014 15:02:21 GMT
Server: Apache
Last-Modified: Fri, 19 Sep 2014 08:36:46 GMT
ETag: "189dc-50367005ed32a"
Accept-Ranges: bytes
Cache-Control: max-age=2419200
Expires: Fri, 17 Oct 2014 15:02:21 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 16191
Content-Type: text/css

It is ok, i see Content-Encoding: gzip

with second server: curl -I --compressed http://web2.tld/file.css

HTTP/1.1 200 OK
Date: Fri, 19 Sep 2014 15:03:47 GMT
Server: Apache
Last-Modified: Fri, 19 Sep 2014 08:36:46 GMT
ETag: "189dc-50367005ed32a"
Accept-Ranges: bytes
Content-Length: 100828
Cache-Control: max-age=2419200
Expires: Fri, 17 Oct 2014 15:03:47 GMT
Vary: Accept-Encoding
Content-Type: text/css

and it is NOT ok: Content-Length: 100828 and no header Content-Encoding: gzip

BUT! strange is here: When i do the same request from web1 to web2 server - gzip is enabled on web2!

also please advise if it possible to send 'Vary' header ONLY when request have 'Accept-Encoding' ?

trim
  • 11
  • 3

0 Answers0