hit-for-pass ignores Vary header
dridi.boukelmoune at zenika.com
Mon Jan 5 12:09:15 CET 2015
On Mon, Jan 5, 2015 at 10:18 AM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
>>What I believe is happening is that the resulting hit-for-pass object
>>that gets generated and cached seems to ignore the Vary header's
>>presence. All subsequent requests for that Host & URI combination get
>>hit-for-pass'ed, regardless of the previously valid object sitting in
>>the cache for the Host & URI & Vary-header-pointer combination.
Since variants are different representations of a *same* resource,
invalidating the resource *could* invalidate all its representations.
AFAICT, this is undefined behavior.
> I tried this scenario out on -trunk using the varnishtest below and
> it does what I expect it to.
The scenario works fine, but it doesn't match Jonathan's description
of his problem. Adding the header to the cache key is his workaround,
but your test passes even with just the built-in VCL on both the
current trunk and the 4.0.2 tag.
Happy New Year,
More information about the varnish-misc