Hello Vincent,

You make a small confusion. The log (varnishlog -b) is showing you that the 
backend is sending cookies, not that varnish is sending the cookies to the 
client.
The cookies are removed from the object before they are sent to the client. 
This means that those cookies will not reach the varnish client (usually user 
browser).

So:

Client asks url -> varnish receives request, forwards to backend -> backend 
responds to varnish with set-cookie -> varnish strips cookie (unset 
beresp.http.set-cookie) and sends the response back to the client

Hope it is clear now for you.

Traian

From: [email protected] 
[mailto:[email protected]] On Behalf Of Vincent
Sent: Friday, December 10, 2010 3:08 PM
To: [email protected]
Subject: remove/unset set-cookies

Hi,

I am trying to remove all set-cookies from the backend but I still found 
Set-Cookie in the log (varnishlog -b).

I have the following setup:

sub vcl_fetch {
    .....
    .....
    unset beresp.http.set-cookie;
}

and varnishlog -b shows something like this:

   16 RxHeader     b Set-Cookie: name=xyc; 
domain=.example.com<http://example.com>; path=/; expires=Sun, 09-Jan-2011 
14:04:10 GMT

I am wondering how to completely remove the Set-Cookie. Currently my hitrate is 
only 80%, I think the set-cookie header is the main reason.

also what's the difference between
    unset beresp.http.set-cookie;
and
    remove beresp.http.set-cookie;


Thank you,

Vincent
_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to