Caching for some cookies?

Albert Tollkuçi albert.tollkuci at gmail.com
Sat Sep 3 20:29:56 CEST 2016


Update: The modules require at least varnish 4.1 so I did upgrade to latest
version from github (varnish-trunk revision c99382d). However I'm still
getting an error in make:

In file included from /usr/local/include/varnish/common/common.h:39:0,
                 from /usr/local/include/varnish/cache/cache.h:39,
                 from vmod_softpurge.c:30:
vmod_softpurge.c: In function 'vmod_softpurge':
/usr/local/include/varnish/vqueue.h:540:39: error: 'struct objcore' has no
member named 'list'
 #define VTAILQ_NEXT(elm, field) ((elm)->field.vtqe_next)
                                       ^
/usr/local/include/varnish/vqueue.h:460:14: note: in expansion of macro
'VTAILQ_NEXT'
      (var) = VTAILQ_NEXT((var), field))
              ^
vmod_softpurge.c:63:2: note: in expansion of macro 'VTAILQ_FOREACH'
  VTAILQ_FOREACH(oc, &oh->objcs, list) {
  ^
vmod_softpurge.c:68:23: error: 'OC_EF_DYING' undeclared (first use in this
function)
   if (oc->exp_flags & OC_EF_DYING)
                       ^
vmod_softpurge.c:68:23: note: each undeclared identifier is reported only
once for each function it appears in
vmod_softpurge.c:85:27: error: 'struct objcore' has no member named 'exp'
   EXP_Rearm(oc, now, 0, oc->exp.grace, oc->exp.keep);
                           ^
vmod_softpurge.c:85:42: error: 'struct objcore' has no member named 'exp'
   EXP_Rearm(oc, now, 0, oc->exp.grace, oc->exp.keep);
                                          ^
Makefile:579: recipe for target 'vmod_softpurge.lo' failed

Stuck completely now...

On Sat, Sep 3, 2016 at 7:23 PM, Miguel González <miguel_3_gonzalez at yahoo.es>
wrote:

> Those vmods are for varnish open source version?
>
> ps: Why my messages are stored in the archives but are not getting
> through by email?
>
>
>
> On 09/03/16 11:16 AM, Albert Tollkuçi wrote:
> > After digging more it seems I have to install varnish modules
> > from https://github.com/varnish/varnish-modules. The instructions to
> > install them are:
> >
> > sudo apt-get install libvarnishapi-dev || sudo yum install
> varnish-libs-devel
> > ./bootstrap   # If running from git.
> > ./configure
> > make
> > make check   # optional
> > sudo make install
> >
> > I was able to successfully perform the steps until make. When I try to
> > make I get the message:
> >
> > /make  all-recursive/
> > /make[1]: Entering directory
> > '/home/atollkuci/varnish-4.0.3/varnish-modules'/
> > /Making all in src/
> > /make[2]: Entering directory
> > '/home/atollkuci/varnish-4.0.3/varnish-modules/src'/
> > //bin/bash: PYTHON@: command not found/
> > /Makefile:803: recipe for target 'vcc_cookie_if.h' failed/
> > /make[2]: *** [vcc_cookie_if.h] Error 127/
> > /make[2]: Leaving directory
> > '/home/atollkuci/varnish-4.0.3/varnish-modules/src'/
> > /Makefile:485: recipe for target 'all-recursive' failed/
> > /make[1]: *** [all-recursive] Error 1/
> > /make[1]: Leaving directory '/home/atollkuci/varnish-4.0.
> 3/varnish-modules'/
> > /Makefile:396: recipe for target 'all' failed/
> > /make: *** [all] Error 2/
> >
> > It looks like it can't find python, but if I run from bash python or
> > python3 I get the python interpreter.
> >
> > Any idea how to proceed?
> >
> > I'm running Ubuntu 15.10 and varnish 4.0.3.
> >
> > Thank you,
> > Albert
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Sep 2, 2016 at 7:05 PM, Albert Tollkuçi
> > <albert.tollkuci at gmail.com <mailto:albert.tollkuci at gmail.com>> wrote:
> >
> >     Sorry for the long post, but I'm stuck here. Below is the full log
> >     from varnishlog for a MISS request (so I can check what's happening
> >     with the backend). In bold there are the important bits:
> >
> >     - In the original request I have "*-   Link           req 294922
> >     restart*". Is the restart normal, because of the miss?
> >
> >     - In the backend response I can see the set cookie header: *-
> >     BerespHeader   Set-Cookie: __IKUB_AL_Myikub_PopUp=1; expires=Thu,
> >     24-Aug-2017 16:48:53 GMT; path=/*
> >     *
> >     *
> >     - My log doesn't show the set-cookie header (*-   VCL_Log        AT
> >     DEBUG - beresp set-cookie:
> >     'ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly'*). Is
> >     that because there are two set-cookie headers and it is showing only
> >     the first?
> >
> >     - Immediately after the log there's a line "*-   BerespUnset
> >      Set-Cookie: __IKUB_AL_Myikub_PopUp=1; expires=Thu, 24-Aug-2017
> >     16:48:53 GMT; path=/"*. It looks like this is responsible for
> >     un-setting the cookie, is that right?
> >
> >     - If so the cookie is striped between my first and second log and
> >     the code in between is the following:
> >
> >     /    if(beresp.http.set-cookie)/
> >     /    {/
> >     /      std.log("AT Vanish - mobile.ikub.al <http://mobile.ikub.al>
> >     original backend set cookie: '" + beresp.http.set-cookie + "'");/
> >     /    }/
> >     /
> >     /
> >     /    # AT: We have to keep all cookies starting with __IKUB/
> >     /    set beresp.http.set-cookie = ";" + beresp.http.set-cookie;/
> >     /    set beresp.http.set-cookie = regsuball(beresp.http.set-cookie,
> >     "; +", ";");/
> >     /    set beresp.http.set-cookie = regsuball(beresp.http.set-cookie,
> >     ";(__IKUB.*)=", "; \1=");/
> >     /    set beresp.http.set-cookie = regsuball(beresp.http.set-cookie,
> >     ";[^ ][^;]*", "");/
> >     /    set beresp.http.set-cookie = regsuball(beresp.http.set-cookie,
> >     "^[; ]+|[; ]+$", "");/
> >     /
> >     /
> >     /    # Clean empty cookies/
> >     /    if (beresp.http.set-cookie ~ "^\s*$") {/
> >     /      set beresp.http.set-cookie = "";/
> >     /    }/
> >     /
> >     /
> >     /    if (beresp.http.set-cookie == ""){/
> >     /      unset beresp.http.set-cookie;/
> >     /    }/
> >     /    else/
> >     /    {/
> >     /      std.log("AT Varnish - mobile.ikub.al <http://mobile.ikub.al>
> >     processed backend cookie: '" + beresp.http.set-cookie + "'");/
> >     /    }/
> >
> >     I have the same regex in the request processing and they're working,
> >     but maybe for some reason not working here...
> >
> >
> >     Full log from varnishlog:
> >
> >     *   << Request  >> 294921
> >     -   Begin          req 294920 rxreq
> >     -   Timestamp      Start: 1472834933.190575 0.000000 0.000000
> >     -   Timestamp      Req: 1472834933.190575 0.000000 0.000000
> >     -   ReqStart       185.158.1.35 5547
> >     -   ReqMethod      GET
> >     -   ReqURL         /Default2.aspx
> >     -   ReqProtocol    HTTP/1.1
> >     -   ReqHeader      Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   ReqHeader      Connection: keep-alive
> >     -   ReqHeader      Pragma: no-cache
> >     -   ReqHeader      Cache-Control: no-cache
> >     -   ReqHeader      Upgrade-Insecure-Requests: 1
> >     -   ReqHeader      User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64;
> >     x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116
> >     Safari/537.36
> >     -   ReqHeader      Accept:
> >     text/html,application/xhtml+xml,application/xml;q=0.9,
> image/webp,*/*;q=0.8
> >     -   ReqHeader      Accept-Encoding: gzip, deflate, sdch
> >     -   ReqHeader      Accept-Language: en-US,en;q=0.8,sq;q=0.6
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; __utmt=1; OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.1472832572;
> >     __utma=1.12079592.1472832572.1
> >     -   ReqHeader      X-Forwarded-For: 185.158.1.35
> >     -   VCL_call       RECV
> >     -   VCL_Log        AT DEBUG - recv URL: /Default2.aspx. Cookies:
> >     '__gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; __utmt=1; OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.147
> >     -   ReqHeader      x-at-debug: 1
> >     -   ReqUnset       Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   ReqHeader      Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   ReqURL         /Default2.aspx
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; __utmt=1; OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.1472832572;
> >     __utma=1.12079592.1472832572.1
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; __utmt=1; OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.1472832572;
> >     __utma=1.12079592.1472832572.1
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; __utmt=1; OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.1472832572;
> >     __utma=1.12079592.1472832572.1
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.1472832572;
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; _ga=GA1.2.12079592.1472832572;
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     _gat=1; OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     __gads=ID=c8c7e856e0927271:T=1472832575:S=ALNI_Mbqww5QA6W-
> HgsPe72zKoyugqygtg;
> >     OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   VCL_return     purge
> >     -   ReqUnset       Accept-Encoding: gzip, deflate, sdch
> >     -   ReqHeader      Accept-Encoding: gzip
> >     -   VCL_call       HASH
> >     -   VCL_return     lookup
> >     -   VCL_call       PURGE
> >     -   ReqHeader      X-Purge: Yes
> >     -   VCL_return     restart
> >     -   Timestamp      Restart: 1472834933.190646 0.000071 0.000071
> >     *-   Link           req 294922 restart*
> >     -   End
> >
> >
> >
> >
> >     *   << BeReq    >> 294923
> >     -   Begin          bereq 294922 fetch
> >     -   Timestamp      Start: 1472834933.190706 0.000000 0.000000
> >     -   BereqMethod    GET
> >     -   BereqURL       /Default2.aspx
> >     -   BereqProtocol  HTTP/1.1
> >     -   BereqHeader    Pragma: no-cache
> >     -   BereqHeader    Upgrade-Insecure-Requests: 1
> >     -   BereqHeader    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64;
> >     x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116
> >     Safari/537.36
> >     -   BereqHeader    Accept:
> >     text/html,application/xhtml+xml,application/xml;q=0.9,
> image/webp,*/*;q=0.8
> >     -   BereqHeader    Accept-Language: en-US,en;q=0.8,sq;q=0.6
> >     -   BereqHeader    X-Forwarded-For: 185.158.1.35
> >     -   BereqHeader    Accept-Encoding: gzip
> >     -   BereqHeader    X-Purge: Yes
> >     -   BereqHeader    x-at-debug: 1
> >     -   BereqHeader    Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   BereqHeader    x-state: MISS
> >     -   BereqHeader    X-Varnish: 294923
> >     -   VCL_call       BACKEND_FETCH
> >     -   VCL_Log        AT DEBUG - fetch bereq URL: /Default2.aspx.
> >     Cookies: ''
> >     -   VCL_return     fetch
> >     -   Backend        43 ikubmobileserver
> >     ikubmobileserver(13.94.212.211,,80)
> >     -   Timestamp      Bereq: 1472834933.190737 0.000031 0.000031
> >     -   Timestamp      Beresp: 1472834933.830661 0.639955 0.639924
> >     -   BerespProtocol HTTP/1.1
> >     -   BerespStatus   200
> >     -   BerespReason   OK
> >     -   BerespHeader   Cache-Control: private
> >     -   BerespHeader   Content-Type: text/html; charset=utf-8
> >     -   BerespHeader   Content-Encoding: gzip
> >     -   BerespHeader   Vary: Accept-Encoding
> >     -   BerespHeader   Server: Microsoft-IIS/8.5
> >     -   BerespHeader   X-AspNet-Version: 2.0.50727
> >     -   BerespHeader   Set-Cookie:
> >     ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly
> >     *-   BerespHeader   Set-Cookie: __IKUB_AL_Myikub_PopUp=1;
> >     expires=Thu, 24-Aug-2017 16:48:53 GMT; path=/*
> >     -   BerespHeader   X-Powered-By: ASP.NET <http://ASP.NET>
> >     -   BerespHeader   Date: Fri, 02 Sep 2016 16:48:53 GMT
> >     -   BerespHeader   Content-Length: 52233
> >     -   TTL            RFC 120 -1 -1 1472834934 1472834934 1472834933 0 0
> >     -   VCL_call       BACKEND_RESPONSE
> >     -   VCL_Log        AT DEBUG - bereq URL: /Default2.aspx. Cookies: ''
> >     *-   VCL_Log        AT DEBUG - beresp set-cookie:
> >     'ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly'*
> >     -   VCL_Log        AT Vanish - mobile.ikub.al
> >     <http://mobile.ikub.al> original backend set cookie:
> >     'ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly'
> >     -   BerespUnset    Set-Cookie:
> >     ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly
> >     *-   BerespUnset    Set-Cookie: __IKUB_AL_Myikub_PopUp=1;
> >     expires=Thu, 24-Aug-2017 16:48:53 GMT; path=/*
> >     -   BerespHeader   set-cookie:
> >     ;ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly
> >     -   BerespUnset    set-cookie:
> >     ;ASP.NET_SessionId=pkkav5uflq02es45dktlo03w; path=/; HttpOnly
> >     -   BerespHeader   set-cookie:
> >     ;ASP.NET_SessionId=pkkav5uflq02es45dktlo03w;path=/;HttpOnly
> >     -   BerespUnset    set-cookie:
> >     ;ASP.NET_SessionId=pkkav5uflq02es45dktlo03w;path=/;HttpOnly
> >     -   BerespHeader   set-cookie:
> >     ;ASP.NET_SessionId=pkkav5uflq02es45dktlo03w;path=/;HttpOnly
> >     -   BerespUnset    set-cookie:
> >     ;ASP.NET_SessionId=pkkav5uflq02es45dktlo03w;path=/;HttpOnly
> >     -   BerespHeader   set-cookie:
> >     -   BerespUnset    set-cookie:
> >     -   BerespHeader   set-cookie:
> >     -   BerespUnset    set-cookie:
> >     -   BerespHeader   set-cookie:
> >     -   BerespUnset    set-cookie:
> >     -   TTL            VCL 900 10 0 1472834934
> >     -   VCL_Log        AT DEBUG - bereq2 URL: /Default2.aspx. Cookies: ''
> >     -   VCL_Log        AT DEBUG - beresp2 set-cookie: ''
> >     -   TTL            VCL 900 21600 0 1472834934
> >     -   VCL_Log        AT DEBUG - bereq3 URL: /Default2.aspx. Cookies: ''
> >     -   VCL_Log        AT DEBUG - beresp3 set-cookie: ''
> >     -   VCL_return     deliver
> >     -   Storage        malloc s0
> >     -   ObjProtocol    HTTP/1.1
> >     -   ObjStatus      200
> >     -   ObjReason      OK
> >     -   ObjHeader      Cache-Control: private
> >     -   ObjHeader      Content-Type: text/html; charset=utf-8
> >     -   ObjHeader      Content-Encoding: gzip
> >     -   ObjHeader      Vary: Accept-Encoding
> >     -   ObjHeader      Server: Microsoft-IIS/8.5
> >     -   ObjHeader      X-AspNet-Version: 2.0.50727
> >     -   ObjHeader      X-Powered-By: ASP.NET <http://ASP.NET>
> >     -   ObjHeader      Date: Fri, 02 Sep 2016 16:48:53 GMT
> >     -   ObjHeader      Content-Length: 52233
> >     -   Fetch_Body     3 length stream
> >     -   Gzip           u F - 52233 194069 80 80 417793
> >     -   BackendReuse   43 ikubmobileserver(13.94.212.211,,80)
> >     -   Timestamp      BerespBody: 1472834933.831743 0.641037 0.001082
> >     -   Length         52233
> >     -   BereqAcct      473 0 473 428 52233 52661
> >     -   End
> >
> >     *   << Request  >> 294922
> >     -   Begin          req 294921 restart
> >     -   Timestamp      Start: 1472834933.190646 0.000071 0.000000
> >     -   ReqStart       185.158.1.35 5547
> >     -   ReqMethod      GET
> >     -   ReqURL         /Default2.aspx
> >     -   ReqProtocol    HTTP/1.1
> >     -   ReqHeader      Connection: keep-alive
> >     -   ReqHeader      Pragma: no-cache
> >     -   ReqHeader      Cache-Control: no-cache
> >     -   ReqHeader      Upgrade-Insecure-Requests: 1
> >     -   ReqHeader      User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64;
> >     x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116
> >     Safari/537.36
> >     -   ReqHeader      Accept:
> >     text/html,application/xhtml+xml,application/xml;q=0.9,
> image/webp,*/*;q=0.8
> >     -   ReqHeader      Accept-Language: en-US,en;q=0.8,sq;q=0.6
> >     -   ReqHeader      X-Forwarded-For: 185.158.1.35
> >     -   ReqHeader      x-at-debug: 1
> >     -   ReqHeader      Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Accept-Encoding: gzip
> >     -   ReqHeader      X-Purge: Yes
> >     -   VCL_call       RECV
> >     -   VCL_Log        AT DEBUG - recv URL: /Default2.aspx. Cookies:
> >     'OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; '
> >     -   ReqUnset       x-at-debug: 1
> >     -   ReqHeader      x-at-debug: 1
> >     -   ReqUnset       Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   ReqHeader      Host: mobile.ikub.al <http://mobile.ikub.al>
> >     -   ReqURL         /Default2.aspx
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   VCL_Log        AT DEBUG - recv2 URL: /Default2.aspx. Cookies:
> >     'OX_plg=swf|shk|pm; __asc=c970f060156eba988423264f56d;
> >     __auc=c970f060156eba988423264f56d; '
> >     -   ReqUnset       Cookie: OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: ;OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie: ;OX_plg=swf|shk|pm;
> >     __asc=c970f060156eba988423264f56d; __auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie:
> >     ;OX_plg=swf|shk|pm;__asc=c970f060156eba988423264f56d;__auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     ;OX_plg=swf|shk|pm;__asc=c970f060156eba988423264f56d;__auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie:
> >     ;OX_plg=swf|shk|pm;__asc=c970f060156eba988423264f56d;__auc=
> c970f060156eba988423264f56d;
> >     -   ReqUnset       Cookie:
> >     ;OX_plg=swf|shk|pm;__asc=c970f060156eba988423264f56d;__auc=
> c970f060156eba988423264f56d;
> >     -   ReqHeader      Cookie: ;
> >     -   ReqUnset       Cookie: ;
> >     -   ReqHeader      Cookie:
> >     -   ReqUnset       Cookie:
> >     -   ReqHeader      Cookie:
> >     -   ReqUnset       Cookie:
> >     -   VCL_Log        AT DEBUG - recv3 URL: /Default2.aspx. Cookies: ''
> >     -   VCL_return     hash
> >     -   VCL_call       HASH
> >     -   VCL_return     lookup
> >     -   Debug          "XXXX MISS"
> >     -   VCL_call       MISS
> >     -   ReqHeader      x-state: MISS
> >     -   VCL_return     fetch
> >     -   Link           bereq 294923 fetch
> >     -   Timestamp      Fetch: 1472834933.831768 0.641192 0.641122
> >     -   RespProtocol   HTTP/1.1
> >     -   RespStatus     200
> >     -   RespReason     OK
> >     -   RespHeader     Cache-Control: private
> >     -   RespHeader     Content-Type: text/html; charset=utf-8
> >     -   RespHeader     Content-Encoding: gzip
> >     -   RespHeader     Vary: Accept-Encoding
> >     -   RespHeader     Server: Microsoft-IIS/8.5
> >     -   RespHeader     X-AspNet-Version: 2.0.50727
> >     -   RespHeader     X-Powered-By: ASP.NET <http://ASP.NET>
> >     -   RespHeader     Date: Fri, 02 Sep 2016 16:48:53 GMT
> >     -   RespHeader     Content-Length: 52233
> >     -   RespHeader     X-Varnish: 294922
> >     -   RespHeader     Age: 0
> >     -   RespHeader     Via: 1.1 varnish-v4
> >     -   VCL_call       DELIVER
> >     -   RespHeader     X-Cache: MISS
> >     -   RespHeader     X-Cache-Hits: 0
> >     -   RespUnset      X-Powered-By: ASP.NET <http://ASP.NET>
> >     -   RespUnset      Server: Microsoft-IIS/8.5
> >     -   RespUnset      X-Varnish: 294922
> >     -   RespUnset      Via: 1.1 varnish-v4
> >     -   RespUnset      X-AspNet-Version: 2.0.50727
> >     -   VCL_Log        AT DEBUG - deliver URL: /Default2.aspx. Cookies:
> ''
> >     -   VCL_Log        AT DEBUG - deliver set-cookie: ''
> >     -   VCL_return     deliver
> >     -   Timestamp      Process: 1472834933.831794 0.641218 0.000026
> >     -   Debug          "RES_MODE 2"
> >     -   RespHeader     Connection: keep-alive
> >     -   RespHeader     Accept-Ranges: bytes
> >     -   Timestamp      Resp: 1472834933.831830 0.641255 0.000036
> >     -   Debug          "XXX REF 2"
> >     -   ReqAcct        828 0 828 276 52233 52509
> >     -   End
> >
> >
> >     On Fri, Sep 2, 2016 at 6:28 PM, Albert Tollkuçi
> >     <albert.tollkuci at gmail.com <mailto:albert.tollkuci at gmail.com>>
> wrote:
> >
> >         Thank you Guillaume,
> >         probably I'm missing something, but can't find any unset.
> >
> >         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?
> >
> >         Albert
> >
> >         On Fri, Sep 2, 2016 at 10:53 AM, Guillaume Quintard
> >         <guillaume at varnish-software.com
> >         <mailto:guillaume at varnish-software.com>> wrote:
> >
> >             Hi,
> >
> >             Look at the varnishlog, there should be a trace of that
> >             unset, once confirmed, find it in your vcl.
> >
> >             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).
> >
> >
> >             On Sep 1, 2016 12:59, "Albert Tollkuçi"
> >             <albert.tollkuci at gmail.com
> >             <mailto:albert.tollkuci at gmail.com>> wrote:
> >
> >                 Hello,
> >                 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.
> >
> >                 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.
> >
> >                 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:
> >
> >                        # AT: DEBUG
> >                        if(bereq.http.x-at-debug == "1") {
> >                          std.log("AT DEBUG - bereq URL: " + bereq.url +
> >                 ". Cookies: '" + bereq.http.Cookie + "'");
> >                          std.log("AT DEBUG - beresp set-cookie: '" +
> >                  beresp.http.set-cookie + "'");
> >                        }
> >
> >                 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.
> >
> >                 Is there anything in between that can strip the cookie?
> >
> >                 Thank you,
> >                 Albert
> >
> >
> >
> >                 --
> >                 Web: http://www.tollkuci.com <http://www.tollkuci.com/>
> >                 Follow me on: LinkedIn
> >                 <http://www.linkedin.com/in/alberttollkuci> Google+
> >                 <https://plus.google.com/+AlbertTollku%C3%A7i/posts>
> Facebook
> >                 <https://www.facebook.com/albert.tollkuci> Twitter
> >                 <https://twitter.com/AlbertTollkuci> Career 2.0
> >                 <http://careers.stackoverflow.com/atollkuci>
> >
> >
> >                 _______________________________________________
> >                 varnish-misc mailing list
> >                 varnish-misc at varnish-cache.org
> >                 <mailto:varnish-misc at varnish-cache.org>
> >                 https://www.varnish-cache.org/lists/mailman/listinfo/
> varnish-misc
> >                 <https://www.varnish-cache.org/lists/mailman/listinfo/
> varnish-misc>
> >
> >
> >
> >
> >         --
> >         Web: http://www.tollkuci.com <http://www.tollkuci.com/>
> >         Follow me on: LinkedIn
> >         <http://www.linkedin.com/in/alberttollkuci> Google+
> >         <https://plus.google.com/+AlbertTollku%C3%A7i/posts> Facebook
> >         <https://www.facebook.com/albert.tollkuci> Twitter
> >         <https://twitter.com/AlbertTollkuci> Career 2.0
> >         <http://careers.stackoverflow.com/atollkuci>
> >         ------------------------------------------------------------
> ------------
> >
> >
> >
> >
> >     --
> >     Web: http://www.tollkuci.com <http://www.tollkuci.com/>
> >     Follow me on: LinkedIn
> >     <http://www.linkedin.com/in/alberttollkuci> Google+
> >     <https://plus.google.com/+AlbertTollku%C3%A7i/posts> Facebook
> >     <https://www.facebook.com/albert.tollkuci> Twitter
> >     <https://twitter.com/AlbertTollkuci> Career 2.0
> >     <http://careers.stackoverflow.com/atollkuci>
> >     ------------------------------------------------------------
> ------------
> >
> >
> >
> >
> > --
> > Web: http://www.tollkuci.com <http://www.tollkuci.com/>
> > Follow me on: LinkedIn
> > <http://www.linkedin.com/in/alberttollkuci> Google+
> > <https://plus.google.com/+AlbertTollku%C3%A7i/posts> Facebook
> > <https://www.facebook.com/albert.tollkuci> Twitter
> > <https://twitter.com/AlbertTollkuci> Career 2.0
> > <http://careers.stackoverflow.com/atollkuci>
> >
> >
> >
> > _______________________________________________
> > varnish-misc mailing list
> > varnish-misc at varnish-cache.org
> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> >
>
>


-- 
Web: http://www.tollkuci.com
Follow me on: LinkedIn <http://www.linkedin.com/in/alberttollkuci> Google+
<https://plus.google.com/+AlbertTollku%C3%A7i/posts> Facebook
<https://www.facebook.com/albert.tollkuci> Twitter
<https://twitter.com/AlbertTollkuci> Career 2.0
<http://careers.stackoverflow.com/atollkuci>
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160903/c007f945/attachment-0001.html>


More information about the varnish-misc mailing list