When setting a cookie, the old ones are lost

Per Buer perbu at varnish-software.com
Thu Aug 30 09:48:48 CEST 2012


Hi,

On Thu, Aug 30, 2012 at 9:00 AM, Cornel Vaideanu <
Cornel.Vaideanu at greppysystems.com> 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.


-- 
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120830/811b92ad/attachment.html>


More information about the varnish-misc mailing list