Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc
Handling multiple beresp.http.set-cookie headers
 

Index | Next | Previous | View Flat


michal.paal at digmia

Mar 15, 2012, 5:04 PM


Views: 218
Permalink
Handling multiple beresp.http.set-cookie headers

> Hi,
>
> I'm trying to solve this problem for about a week. Situation is that I need to check in VCL, if backend response has cookie with "Logged_in:Y". Backend is also often setting more cookies, and there is only little chance that we can make developers change application, because it is too complex. From my observation and debugging, if I configure this in vcl_fetch:
>
> if (beresp.http.Set-Cookie ~ "Logged_in:Y") {
> return (hit_for_pass);
> }
>
> The problem is that "beresp.http.Set-Cookie" is filled only with first Set-Cookie header from backend. If there are other Set-Cookie headers, I cannot match anything in them.
>
> So, my question is can I somehow match or access all Set-Cookie headers?
>
> I've also tryed consolidating Set-Cookie headers using vmod_std.collect, but this violates RFC and doesn't work for clients.
>
> I would be very thankful for any ideas.
>
> Have a nice day!
>
>
>
> Michal Paal
>
> http://www.digmia.com
>
Attachments: smime.p7s (4.91 KB)

Subject User Time
Handling multiple beresp.http.set-cookie headers michal.paal at digmia Mar 15, 2012, 5:04 PM
    Re: Handling multiple beresp.http.set-cookie headers perbu at varnish-software Mar 16, 2012, 2:01 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.