VCL purge

André Øien Langvand andre at idium.no
Wed Mar 5 12:52:21 CET 2008


Wonderful, however, doing this from the purge_hash() function still fails:

purge_hash(req.url "#" req.http.host "#");
-------------------###--------------------
Error: Expected ')' got '"#"'

--
André Øien Langvand <andre at idium.no> - PGP: 0x7B1E3468
Systemadministrator - Idium AS - http://www.idium.no


Dag-Erling Smørgrav wrote:
> 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



More information about the varnish-misc mailing list