different object hashed for firefox and chrome

David Birdsong david.birdsong at gmail.com
Sat Apr 10 01:31:14 CEST 2010


On Fri, Apr 9, 2010 at 4:25 PM, Laurence Rowe <l at lrowe.co.uk> wrote:
> This is almost certainly the result of a Vary: Accept-Encoding header
> on your response (Chrome, Firefox and IE all have slightly different
> Accept-Encoding headers). See
> http://varnish-cache.org/wiki/FAQ/Compression and add the snippet to
> normalise the Accept-Encoding header in vcl_recv. You don't normally
> need to customise vcl_hash.
>
thanks for that link.  i've customized vcl_hash to exclude
req.http.host which i dont want as part of the hash. my understanding
was that this was included by default.

> Laurence
>
> On 9 April 2010 23:37, David Birdsong <david.birdsong at gmail.com> wrote:
>> I'm trying to understand how an identical request to Firefox and
>> Chrome are hashing to a different object in Varnish.
>>
>> Here's the Firefox request:
>> http://pastebin.com/RkA9uhMp
>>
>> Here's the Chrome request:
>> http://pastebin.com/4pAe8Cac
>>
>> There are a few differences in the request between the two browsers,
>> but I've set vcl_hash to only use req.url:
>> sub vcl_hash {
>>        set req.hash = req.url;
>> #       set req.hash += req.url;
>> #       set req.hash += req.http.host;
>>        hash;
>> }
>>
>> I'm running varnish from trunk at R4390.
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>>
>




More information about the varnish-misc mailing list