[Varnish] #563: RE: Unable to mangle one of multiple Set-Cookie headers.

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jun 9 12:18:50 CEST 2010


In message <AANLkTikjgR4OBliPY6sgU6UTUl-9fMtw3xGPoHMizlRc at mail.gmail.com>, Lee Doolan writes:

>Just before the vcl_fetch() routine is called, all of the headers are
>examined and the value fields of all of the Set-Cookie headers are
>concatenated together.  The value fields are separated by a known
>separator string, and copied into an header named 'X-Set-Cookies'.
>The X header can be referenced in the vcl_fetch() routine like this
>(for instance):

Without any malice intended, this is a somewhat hackish way to work
around the problem.

I have long had a plan to make cookies first-rate objects in VCL, using
a syntax something like:

	sub vcl_recv {
		if (req.cookie.CLIENT_STATE ~ "logged in") {
			do_something();
		}
	}

And the necessary changes are slowly bubbling up towards the top of my 
todo list, so hopefully it will make it into 3.0

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.




More information about the varnish-bugs mailing list