What is The logic of Vary Headers cachiness?

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Wed, 17 Jul 2013 13:29:21 +0300

As I have seen some issues that "indicate" that the Vary headers cause
some problems while caching..

I want to make sure I understand how a Vary headers should be treated
before diving into some code.

My assumption is that there are "Vary" headers that the servers might be
considering while answering the request.

If the above is indeed right and my assumption of how squid caches vary
headers There is a problem either in finding the corresponded responses
or something else.
Please help me understand how is the logic of The Vary headers works.

Let say I have a requeset:

----
GET /resource.dll HTTP/1.1
Host: example.net
Accept-Encoding: *.*
-----
the corresponding request will be:
----
GET /resource.dll HTTP/1.1
Host: example.net
-----
since there is no Vary field that indicates there is a Vary header
present in the request, or the existence of a so called "Vary" header
like "Accept-Encoding" is like stating "consider this vary header"?
if the request will be the same then OK.
if the response is not the same then we have a problem.
Would we calculate the Vary based on the request only or based on also
the response?? and then when the response is not matching the request
what will be the hash of the request?
I assume based only on the request and maybe determine some headers
while validating the object in cache in order to match it to the current
response.
Please correct me if i'm wrong.
Eliezer
Received on Wed Jul 17 2013 - 10:29:54 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 17 2013 - 12:00:35 MDT