[squid-users] squid ignoring content-encoding in vary?

From: Mark Gibson <mark@dont-contact.us>
Date: Thu, 29 Mar 2007 20:10:57 -0600

I'm trying to cache pages based on Accept-Encoding, doesn't seem to be
working.

I've put Accept-Encoding in the vary tag.

I have squid in front of apache.

Here's what the cache.log says with debugging turned on. First request
sends accept-encoding="gzip,deflate". Second doesn't. They both return
the same file form the cache.

I'm upgrading to 2.6 from 2.5, and the setup worked find in 2.5.

Any insight would be appreciated,

Mark

############
GZIPPED
############
==> cache.log <==
2007/03/29 21:42:50| The request GET
http://www.mysite.com/lost_and_found is ALLOWED, because it matched
'to_localhost'
2007/03/29 21:42:50| storeLocateVary: cookie, accept-encoding="gzip,deflate"
2007/03/29 21:42:50| storeLocateVaryRead: MATCH!
6DF71744FE8F23BA86D8EB42C9072B4A
2007/03/29 21:42:50| clientProcessHit: Vary detected!
2007/03/29 21:42:50| clientProcessVary: HIT
key=6DF71744FE8F23BA86D8EB42C9072B4A etag=
2007/03/29 21:42:50| clientProcessHit: Vary MATCH!
2007/03/29 21:42:50| clientProcessHit: HIT
2007/03/29 21:42:50| The reply for GET
http://apache-1.mysite.com:81/lost_and_found is ALLOWED, because it
matched 'all'
2007/03/29 21:42:50| storeLocateVary: DONE
2007/03/29 21:42:50| clientReadRequest: FD 19: no data to process ((11)
Resource temporarily unavailable)

#############
NOT GZIPPED
#############
==> cache.log <==
2007/03/29 21:43:18| The request GET
http://www.mysite.com/lost_and_found is ALLOWED, because it matched
'to_localhost'
2007/03/29 21:43:18| storeLocateVary: cookie, accept-encoding
2007/03/29 21:43:18| storeLocateVaryRead: MATCH!
6DF71744FE8F23BA86D8EB42C9072B4A
2007/03/29 21:43:18| clientProcessHit: Vary detected!
2007/03/29 21:43:18| clientProcessVary: HIT
key=6DF71744FE8F23BA86D8EB42C9072B4A etag=
2007/03/29 21:43:18| clientProcessHit: Vary MATCH!
2007/03/29 21:43:18| clientProcessHit: HIT
2007/03/29 21:43:18| The reply for GET
http://apache-1.mysite.com:81/lost_and_found is ALLOWED, because it
matched 'all'
2007/03/29 21:43:18| storeLocateVary: DONE
2007/03/29 21:43:18| clientReadRequest: FD 19: no data to process ((11)
Resource temporarily unavailable)

------------------
Here's my squid.conf

# WELCOME TO SQUID 2.6.STABLE12
# ----------------------------
#TEST
http_port xx.xx.xxx.205:80 vhost

logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st
"%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh

access_log /usr/local/squid2.6/var/logs/access.log combined
debug_options ALL,2
url_rewrite_program /usr/local/bin/squidRedirect2
url_rewrite_children 7

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_vary on

refresh_pattern -i
\.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$
1440 50% 4320
#refresh_pattern ^http: 5 66% 10 ignore-reload
refresh_pattern ^http: 5 66% 10
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl to_localhost dst xx.xx.xxx.205
acl Safe_ports port 80 # http
acl CONNECT method CONNECT
acl TRACE method TRACE
http_access allow manager localhost
http_access deny manager
http_access allow to_localhost
http_access allow Safe_ports
http_access deny !Safe_ports
acl our_net src xx.xx.xxx.205
acl purge method PURGE
http_access allow purge localhost
http_access allow purge our_net
http_access deny purge
http_access allow our_net
http_access deny CONNECT
http_access allow all
http_reply_access allow all
cache_mgr webmaster@mysite.com
visible_hostname mysite.com
strip_query_terms off
coredump_dir /usr/local/squid2.6/var/logs
always_direct allow to_localhost
never_direct allow all
Received on Thu Mar 29 2007 - 20:11:21 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Mar 31 2007 - 13:00:02 MDT