[Varnish] #574: Comparing two headers
Varnish
varnish-bugs at projects.linpro.no
Thu Nov 5 13:21:45 CET 2009
#574: Comparing two headers
-------------------------+--------------------------------------------------
Reporter: mikko | Owner: phk
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Hello,
I am trying to achieve the following with VCL:
{{{
if (req.http.cookie ~ "country=[^;]+") {
set req.http.X-Cookie-Country = regsub(req.http.Cookie,
"country=([^;]+)", "\1");
set req.http.X-Url-Country = regsub(req.url, "^/([a-zA-Z]{2})/",
"\1");
if (req.http.X-Cookie-Country != req.http.X-Url-Country) {
error 750 req.http.X-Cookie-Country
}
}
}}}
I am using Varnish 2.0.4 and the VCL compiler answers with the following
message:
Message from VCC-compiler:
Expected CSTR got 'req.http.X-Url-Country'
Error 750 is from VCLExamples to do redirect.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/574>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list