Varnish and language cookie

Cosimo Streppone cosimo at streppone.it
Sat Feb 27 16:32:15 CET 2010


In data 27 febbraio 2010 alle ore 16:12:55, Alessandro Ronchi  
<alessandro.ronchi at soasi.com> ha scritto:

> 2010/2/19 Cosimo Streppone <cosimo at streppone.it>:
>
>> I'm no expert, but I think your config file
>> explicitly defeats caching when there is a cookie.
>>
>> 41  if (req.http.Authorization || req.http.Cookie) {
>
> You are right.
> I have a big problem:
>
> [...]

> - cookie is removed from the browser.

??? This shouldn't happen at all.

Maybe you're sending "Set-Cookie" headers from the django app
and they are being stored with the cached objects?

If so, when you know you're serving a cache hit, then
you can unset obj.http.Set-Cookie. IINM, that should
happen in vcl_deliver().

> Is it possible to save to a temp var the entire cookie, replacing in
> it the not important cookies and if that var is emtpy return cached
> version ignoring req.http.Cookie and leave that untoucked?
> I've tried but it but without success.

Cc'd varnish-misc, maybe there's someone facing the same exact problem,

-- 
Cosimo



More information about the varnish-misc mailing list