varnish & cookies & multilanguage

Dag-Erling Smørgrav des at linpro.no
Thu Aug 2 16:41:17 CEST 2007


"Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
> Hash that part of the cookie in addition to the URL and host, something like:
>
> 	vcl_hash {
> 		if (req.http.cookie) {
> 			set req.hash += regsub(
> 			    req.http.cookie, 
> 			    ".*LOCALIZER_LANGUAGE=\"(..)\".*",
> 			    "$1");
> 		}
> 	}
>
> (If this work, please take a moment to add it to our FAQ!)

shouldn't

vcl_hash {
    req.hash += req.http.cookie[LOCALIZER_LANGUAGE];
}

work, or haven't you implemented subscripting yet?

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no



More information about the varnish-misc mailing list