Re: varnish & cookies & multilanguage

2007-08-09 Thread rafailowski
Hello, just a (late!) feed back... It's works really fine. sub vcl_recv { if (req.http.cookie ~ "LOCALIZER_LANGUAGE") { set req.http.mylang = regsub( req.http.cookie, ".*LOCALIZER_LANGUAGE=%22(..)%22.*",

Re: varnish & cookies & multilanguage

2007-08-02 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, rafailowski writes: >It doesn't work with this: > >sub vcl_hash { >if (req.http.cookie) { >set req.hash += regsub( >req.http.cookie, >".*LOCALIZER_LANGUAGE=%22(..)%22.*", >"$1"); >} >} >

Re: varnish & cookies & multilanguage

2007-08-02 Thread rafailowski
It doesn't work with this: sub vcl_hash { if (req.http.cookie) { set req.hash += regsub( req.http.cookie, ".*LOCALIZER_LANGUAGE=%22(..)%22.*", "$1"); } } So i investiguate the logs and i found this, it seems that it c

Re: varnish & cookies & multilanguage

2007-08-02 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= writes: >"Poul-Henning Kamp" <[EMAIL PROTECTED]> writes: >shouldn't > >vcl_hash { >req.hash +=3D req.http.cookie[LOCALIZER_LANGUAGE]; >} > >work, or haven't you implemented subscripting yet? Not implemented yet. -- Poul-

Re: varnish & cookies & multilanguage

2007-08-02 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, rafailowski writes: >There's a little problem with these regexp >".*LOCALIZER_LANGUAGE=\"(..)\".*", >At the second \ ,varnish returns a "Syntax error". Yeah, I'm forgetting that I tried to make it easier for webmasters :-) Try using %22 instead of \" ".*

Re: varnish & cookies & multilanguage

2007-08-02 Thread Dag-Erling Smørgrav
"Poul-Henning Kamp" <[EMAIL PROTECTED]> 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, >

Re: varnish & cookies & multilanguage

2007-08-02 Thread rafailowski
2007/8/2, Poul-Henning Kamp <[EMAIL PROTECTED]>: > 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 Cook

Re: varnish & cookies & multilanguage

2007-08-02 Thread Poul-Henning Kamp
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

varnish & cookies & multilanguage

2007-08-02 Thread rafailowski
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" The url used to change language on the website is like that: ht