<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Thank you Guillaume,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">probably I'm missing something, but can't find any unset.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Is there anything running before vcl_backend_response? I see the cookie in the backend side and is not there anymore in vcl_backend_response?</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Albert</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 2, 2016 at 10:53 AM, Guillaume Quintard <span dir="ltr"><<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Hi,</p>
<p dir="ltr">Look at the varnishlog, there should be a trace of that unset, once confirmed, find it in your vcl.</p>
<p dir="ltr">Know that if you don't return from a subroutine, the built-in vcl is executed ("locate builtin.vcl" to find a commented version of it).</p>
<div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Sep 1, 2016 12:59, "Albert Tollkuçi" <<a href="mailto:albert.tollkuci@gmail.com" target="_blank">albert.tollkuci@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr"><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Hello,</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">I've started using Varnish a few months ago and my vcl files has started to get complicated. I'm serving 5 different sites with the same varnish instance (using different backends) and this part is working.</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Now I have some cases that for some sites I need to keep some cookies and cache different versions based on them. Basic scenario is to show the user a message only the first time he sees the page. Without varnish if the cookie is not there I set it and show the message. Next time the cookie is there and no message is shown.</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">With varnish my logic is to include the cookie in hash and cache two different versions. The challenge is to make sure cookies are set correctly and here I'm kind of stack. I've added some debug messages in my vcl and for some reason I'm not seeing the cookies I set in my server in vcl_backend_response. Inside the routine, I have the following code in the beginning:</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><div>       # AT: DEBUG</div><div>       if(bereq.http.x-at-debug == "1") {</div><div>         std.log("AT DEBUG - bereq URL: " + bereq.url + ". Cookies: '" + bereq.http.Cookie + "'");</div><div>         std.log("AT DEBUG - beresp set-cookie: '" +  beresp.http.set-cookie + "'");</div><div>       }</div><div><br></div><div>I set x-at-debug header in vcl_recv based on my IP, so I can track only my requests. In the server side I see the cookie "__IKUB_AL_Myikub_PopUp" being set, but in vcl_backend_response is not.</div><div><br></div><div>Is there anything in between that can strip the cookie?</div><div><br></div><div>Thank you,</div><div>Albert</div><div><br></div></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div><br></div>-- <br><div><div dir="ltr"><div><span style="font-size:small;color:rgb(61,133,198);font-family:"trebuchet ms",sans-serif">Web: </span><a href="http://www.tollkuci.com/" style="font-size:small;font-family:"trebuchet ms",sans-serif" target="_blank">http://www.tollkuci.com</a><br></div><div><span style="color:rgb(61,133,198);font-family:"trebuchet ms",sans-serif;font-size:small">Follow me on: </span><a href="http://www.linkedin.com/in/alberttollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2flinkedin_icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">LinkedIn</a> <a href="https://plus.google.com/+AlbertTollku%C3%A7i/posts" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fgoogleplus-icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Google+</a> <a href="https://www.facebook.com/albert.tollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fFacebook_Icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Facebook</a> <a href="https://twitter.com/AlbertTollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fTwitterIcon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;"><wbr>Twitter</a> <a href="http://careers.stackoverflow.com/atollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fcareers-icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Career 2.0</a></div><font style="font-family:"trebuchet ms",sans-serif;color:rgb(102,102,102)"><br></font></div></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/varnish<wbr>-misc</a><br></blockquote></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><span style="font-size:small;color:rgb(61,133,198);font-family:"trebuchet ms",sans-serif">Web: </span><a href="http://www.tollkuci.com/" style="font-size:small;font-family:"trebuchet ms",sans-serif" target="_blank">http://www.tollkuci.com</a><br></div><div><span style="color:rgb(61,133,198);font-family:"trebuchet ms",sans-serif;font-size:small">Follow me on: </span><a href="http://www.linkedin.com/in/alberttollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2flinkedin_icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">LinkedIn</a> <a href="https://plus.google.com/+AlbertTollku%C3%A7i/posts" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fgoogleplus-icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Google+</a> <a href="https://www.facebook.com/albert.tollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fFacebook_Icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Facebook</a> <a href="https://twitter.com/AlbertTollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fTwitterIcon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Twitter</a> <a href="http://careers.stackoverflow.com/atollkuci" style="font-family:arial,verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fcareers-icon.png.jpgx" width="24" style="margin: 2px; padding: 0px; vertical-align: middle;">Career 2.0</a></div><font style="font-family:"trebuchet ms",sans-serif;color:rgb(102,102,102)"><hr style="color:rgb(34,34,34);font-family:arial,verdana,sans-serif;font-size:12px"></font></div><br></div></div>
</div></div>