Varnish 3.0.2 req.hash

Roberto O. Fernández Crisial roberto.fernandezcrisial at gmail.com
Fri Feb 10 21:48:08 CET 2012


Hugues,

Try this:

set req.http.X-TEST = req.hash;
set req.http.TEST = req.http.X-TEST;

It should work.

Good  luck,

Roberto (@rofc)


On Fri, Feb 10, 2012 at 5:08 PM, Hugues Alary <hugues.alary at gmail.com>wrote:

> Hi!
>
> I hope this question have not been asked and answered hundreds of times,
> but I couldn't find an answer to it.
>
> I'm using varnish 3.0.2. It is written in the documentation :
>
> The following variables are available while determining the hash key of an
>> object:
>> req.hash
>> The hash key used to refer to an object in the cache. Used when both
>> reading from and writing to the cache.
>
>
> I have tried using req.hash everywhere in my configuration file (vcl_hash,
> vcl_deliver, etc) and I always get this error at the compilation:
>
> Message from VCC-compiler:
>> Symbol not found: 'req.hash' (expected type STRING_LIST):
>> ('input' Line 218 Pos 29)
>>         set req.http.TEST = req.hash;
>> ----------------------------########-
>> Running VCC-compiler failed, exit 1
>> VCL compilation failed
>
>
> What am I missing? How exactly can I get the hash of a request?
>
> Your help would be greatly appreciated!
>
> Thanks in advance,
> -Hugues
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120210/fdbdadac/attachment-0001.html>


More information about the varnish-misc mailing list