In message <[EMAIL PROTECTED]>, rafailowski writes
:
>Hello,
>I'm new to varnish and i have some problems with cookies.
>I have to cache a website who use coookies to determine the language.
>
>The cookies are:
>15 TxHeader     b Cookie: _ZopeId="23273311A29b-he1CIg"; 
>LOCALIZER_LANGUAGE="es"

>Is there's a way to cache a website like this, using cookies for language?

I can think of one way that might work:

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!)

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to