Hi Traian,<br><br>Thank you!!<br><br>Vincent<br><br><div class="gmail_quote">On Fri, Dec 10, 2010 at 6:12 AM, Traian Bratucu <span dir="ltr"><<a href="mailto:traian.bratucu@eea.europa.eu">traian.bratucu@eea.europa.eu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hello Vincent,</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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. </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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).</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">So:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Client asks url -> varnish receives request, forwards to backend -> backend responds to varnish <b>with</b> set-cookie -> varnish strips cookie (unset beresp.http.set-cookie) and sends the response back to the client</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hope it is clear now for you.</span></p><p class="MsoNormal">

<span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Traian</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:varnish-misc-bounces@varnish-cache.org" target="_blank">varnish-misc-bounces@varnish-cache.org</a> [mailto:<a href="mailto:varnish-misc-bounces@varnish-cache.org" target="_blank">varnish-misc-bounces@varnish-cache.org</a>] <b>On Behalf Of </b>Vincent<br>

<b>Sent:</b> Friday, December 10, 2010 3:08 PM<br><b>To:</b> <a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br><b>Subject:</b> remove/unset set-cookies</span></p><div><div>

</div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal">Hi,<br><br>I am trying to remove all set-cookies from the backend but I still found Set-Cookie in the log (varnishlog -b). <br><br>I have the following setup:<br>

<br>sub vcl_fetch {<br>    .....<br>    .....<br>    unset beresp.http.set-cookie;<br>}<br><br>and varnishlog -b shows something like this:<br><br>   16 RxHeader     b Set-Cookie: name=xyc; domain=.<a href="http://example.com" target="_blank">example.com</a>; path=/; expires=Sun, 09-Jan-2011 14:04:10 GMT<br>

<br>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.<br><br>also what's the difference between <br>    unset beresp.http.set-cookie;<br>

and <br>    remove beresp.http.set-cookie;<br><br><br>Thank you,<br><br>Vincent</p></div></div></div></div></blockquote></div><br>