Hi,
I'm having a problem with documents with Vary headers not being cached
properly (at all it seems!). I'm probably missing something, but it looks
like a bug to me. I'm using code from the Sept 12th squid-head snapshot.
The client sends a request with a custom header, say, "X-MyHeader: 1", and
the server generates a response with "Vary: X-MyHeader". Upon subsequent
idential requests, squid still passes the request onto its parent cache
(not squid - my own application actually) which re-requests the data from
the origin server.
The access.log entry looks like:
1000765137.314 115 129.97.XX.XX TCP_HIT/200 1417 GET
http://XXX.uwaterloo.ca/test.gif - FIRST_UP_PARENT/YYY.uwaterloo.ca
image/gif
I.e. it says its a HIT, but the cache.log entries look like:
1000765137.199 RELEASE 00 000006C5 FE4D361985171DBD40DC42DB73E38E18 200
1000741918 999182720 -1 image/gif -1/1093 GET
http://XXX.uwaterloo.ca/test.gif
1000765137.199 RELEASE 00 000006C4 2E9E3FA4CF69790538601B9E6FD0E321 200
1000741918 -1 1000841918 x-squid-internal/vary -1/221 GET
http://XXX.uwaterloo.ca/test.gif
1000765137.199 SWAPOUT 00 000006C6 2E9E3FA4CF69790538601B9E6FD0E321 200
1000765137 -1 1000865137 x-squid-internal/vary -1/221 GET
http://XXX.uwaterloo.ca/test.gif
1000765137.314 SWAPOUT 00 000006C7 FE4D361985171DBD40DC42DB73E38E18 200
1000765137 999182720 -1 image/gif -1/1093 GET
http://XXX.uwaterloo.ca/test.gif
I.E.: It's RELEASING the object and the internal vary meta-object from teh
cache and then re-acquiring them.
Any idea what could be going on here? My understanding of the Vary
implementation is that squid would independantly cache multiple versions
of the object based on the value of the X-MyHeader request header.
One other note: If the origin server doesn't add the Vary header, squid
does cache the object as expected (but of course, will return the wrong
version if a request with a different X-MyHeader is made).
Oh, and I don't know what the format of the cache file is, but this might
be important: If I look at the cache file for the object (not the vary
meta-object) I see the string "X-MyHeader" just after the URL and before
the HTTP response data, but I don't see a string for the VALUE of the
header (i.e. if the request was "X-MyHeader: foobar", "foobar" doesn't
appear in the file). I haven't looked at the code yet to see if it SHOULD
appear in the file or not (i.e. maybe its just encoded as a hash value or
something), but I sort of expected it would...
Could this have something to do with the fact that I'm using a
non-standard header? Any suggestions what else I should look at, or what
might be causing the problem? I'm about to dive into the source, but I
figured I'd ask here first.
Thanks,
Rick
Received on Mon Sep 17 2001 - 16:36:23 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:14 MST