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");
>        }
>}
>
>So i investiguate the logs and i found this, it seems that it crash
>the process childs.

It's not the %22 that causes the crash, it is a memory management
issue, and I don't have a 4 minute fix right now, I've opened a
ticket and will look at it.

You may be able to work around this for now by doing the substitution
into a pseudo header in vcl_recv and use that in vcl_hash, something like:

sub vcl_recv {
        [...]
        if (req.http.cookie ~ LOCALIZER_LANGUAGE) {
                set req.http.mylang = regsub(
                        req.http.cookie,
                        ".*LOCALIZER_LANGUAGE=%22(..)%22.*",
                        "$1");
                lookup;
        }
        [...]
}


sub vcl_hash {
        set req.hash += req.http.mylang;
}



-- 
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
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to