<div>Hugues,<br><br>Try this:<br><br>set req.http.X-TEST = req.hash;<br>set req.http.TEST = req.http.X-TEST;<br><br>It should work.<br><br>Good luck,</div><div><br>Roberto (@rofc)</div><div><br><br><div class="gmail_quote">
On Fri, Feb 10, 2012 at 5:08 PM, Hugues Alary <span dir="ltr"><<a href="mailto:hugues.alary@gmail.com">hugues.alary@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi!<div><br></div><div>I hope this question have not been asked and answered hundreds of times, but I couldn't find an answer to it.</div><div><br></div><div>I'm using varnish 3.0.2. It is written in the documentation :</div>
<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="arial, helvetica, sans-serif"><span style="line-height:20px;text-align:justify;color:rgb(34,34,34)">The following variables are available while determining the hash key of an object:<br>
</span></font><font face="arial, helvetica, sans-serif">req.hash<br></font><font face="arial, helvetica, sans-serif">The hash key used to refer to an object in the cache. Used when both reading from and writing to the cache.</font></blockquote>
<div><div><br></div><div>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:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace">Message from VCC-compiler:<br>Symbol not found: 'req.hash' (expected type STRING_LIST):<br>('input' Line 218 Pos 29)<br> set req.http.TEST = req.hash;<br>
----------------------------########-<br>Running VCC-compiler failed, exit 1<br>VCL compilation failed</font></blockquote></div><div><br></div><div>What am I missing? How exactly can I get the hash of a request?</div><div>
<br></div><div>Your help would be greatly appreciated!</div><div><br></div><div>Thanks in advance,</div><div>-Hugues</div>
</div>
<br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div>