Always sending gzip?
Simon Lyall
simon at darkmere.gen.nz
Sun Mar 13 22:22:03 CET 2011
Getting a weird thing where the server is returning gzip'd content even when we don't ask for it.
Running 2.1.5 from the rpm packages
Our config has:
# If Accept-Encoding contains "gzip" then make it only include that. If not
# then remove header completely. deflate just causes problems
#
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|mp4|flv|pdf)$") {
# No point in compressing these
remove req.http.Accept-Encoding;
} elsif (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} else {
# unkown algorithm
remove req.http.Accept-Encoding;
}
}
But:
$ curl -v -H "Accept-Encoding: fff" -H "Host: www.xxxx.com" http://yyy/themes/0/scripts/getTime.cfm > /dev/null
> GET /themes/0/scripts/getTime.cfm HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Accept: */*
> Accept-Encoding: fff
> Host: www.xxxx.com
>
< HTTP/1.1 200 OK
< Server: Apache
< Cache-Control: max-age=300
< X-UA-Compatible: IE=EmulateIE7
< Content-Type: text/javascript
< Proxy-Connection: Keep-Alive
< Content-Encoding: gzip
< Content-Length: 176
< Date: Sun, 13 Mar 2011 21:13:24 GMT
< Connection: keep-alive
< Cache-Info: Object-Age=228, hits=504, Cache-Host=yyy, Backend-Host=apn121, healthy=yes
34 SessionOpen c 1.2.3.4 21147 :80
34 ReqStart c 1.2.3.4 21147 248469172
34 RxRequest c GET
34 RxURL c /themes/0/scripts/getTime.cfm
34 RxProtocol c HTTP/1.1
34 RxHeader c User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
34 RxHeader c Accept: */*
34 RxHeader c Accept-Encoding: fff
34 RxHeader c Host: www.xxx.com
34 VCL_call c recv lookup
34 VCL_call c hash hash
34 Hit c 248452316
34 VCL_call c hit deliver
34 VCL_call c deliver deliver
34 TxProtocol c HTTP/1.1
34 TxStatus c 200
34 TxResponse c OK
34 TxHeader c Server: Apache
34 TxHeader c Cache-Control: max-age=300
34 TxHeader c X-UA-Compatible: IE=EmulateIE7
34 TxHeader c Content-Type: text/javascript
34 TxHeader c Proxy-Connection: Keep-Alive
34 TxHeader c Content-Encoding: gzip
34 TxHeader c Content-Length: 176
34 TxHeader c Accept-Ranges: bytes
34 TxHeader c Date: Sun, 13 Mar 2011 21:11:36 GMT
34 TxHeader c Connection: keep-alive
34 TxHeader c Cache-Info: Object-Age=120, hits=243, Cache-Host=yyy, Backend-Host=apn121, healthy=yes
34 Length c 176
34 ReqEnd c 248469172 1300050696.585048914 1300050696.585428953
0.000026941 0.000339031 0.000041008
--
Simon Lyall | Very Busy | Web: http://www.darkmere.gen.nz/
"To stay awake all night adds a day to your life" - Stilgar | eMT.
More information about the varnish-misc
mailing list