VCL purge

Dag-Erling Smørgrav des at linpro.no
Wed Mar 5 12:21:42 CET 2008


Dag-Erling Smørgrav <des at linpro.no> writes:
> André Øien Langvand <andre at idium.no> writes:
> > purge_hash(req.url + "#" + req.http.host);
> > -------------------#----------------------
> > Error: Expected ')' got '+'
> >
> > purge_hash(req.url + '#' + req.http.host);
> > ---------------------#--------------------
> > Error: Syntax error at
> I'm going to have to pass this on to Poul-Henning.  I thought we
> supported string concatenation, but perhaps not in function calls?

phk says to remove the + :)

I tested it with the following VCL code:

sub vcl_fetch {
        set obj.http.X-Varnish-Hash = obj.hash;
        set obj.http.X-Varnish-Foo = req.url "#" req.http.host "#";
}

which gives

X-Varnish-Hash: /index.html#www.des.no#
X-Varnish-Foo: /index.html#www.des.no#

showing that the two are identical.

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



More information about the varnish-misc mailing list