Hello
  Thank you for the advices, in this scenario I am forced to use a cookie 
because I want to make a 307 redirect every time varnish would send 503 to 
borwser, but I need to send a cookie to prevent redirect loops.

If you have any solution for this, your advice will be highly appreciated.

I tried this way:  set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar"
but it didn't work for me.  Are you sure this method should work or I am forced 
to use the vmod that Paul suggested ?


Thank you very much


________________________________
From: Per Buer [[email protected]]
Sent: Thursday, August 30, 2012 10:48 AM
To: Cornel Vaideanu
Cc: [email protected]
Subject: Re: When setting a cookie, the old ones are lost

Hi,

On Thu, Aug 30, 2012 at 9:00 AM, Cornel Vaideanu 
<[email protected]<mailto:[email protected]>> 
wrote:

Can you tell me how can I set a new cookie without losing the cookies that 
apache sends ?

The problem is that there can, according to the IETF, only one Set-Cookie 
header.  What you want to so is to modify the exsisting set-cookie header.

Something like:
 set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar"

You could add another Set-Cookie header as Paul proposed but that breaks the 
spec, all though it will probably work for at least 99% of the clients out 
there.

Per.


--
[http://www.varnish-software.com/sites/default/files/varnishsoft_white_190x47.png]
Per Buer
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
Varnish makes websites fly!
Whitepapers<http://www.varnish-software.com/whitepapers> | 
Video<http://www.youtube.com/watch?v=x7t2Sp174eI> | 
Twitter<https://twitter.com/varnishsoftware>




Cornel Vaideanu
PHP Developer

M:

[http://greppysystems.com/ftp/logo.png]
17-19A, Ploiesti Street,
Cluj-Napoca, Romania
www.greppysystems.com<http://greppysystems.com>
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to