Trying to look at the hash string can be useful for debugging,
especially if there are huge, ugly regsub going on:
Message from VCC-compiler:
String representation of 'req.hash' not implemented yet.
(input Line -- Pos 50)
set req.http.X-Varnish-HashKey = req.hash;
-------------------------------------------------########-
Running VCC-compiler failed, exit 1
Current workaround is to repeat the ugly, unmaintainable code twice:
set req.hash += regsub(regsub(regsub(req.url,
"^([/]xxx[?])[^&]*[&]?(q=[^&]*).*$", "\1\2"),"(%2520|
|\+)+xxs:.*$",""),"(%2520| |\+)+-xxx.*$","");
set req.http.X-Varnish-HashKey =
regsub(regsub(regsub(req.url, "^([/]xxx[?])[^&]*[&]?(q=[^&]*).*$",
"\1\2"),"(%2520| |\+)+xxx:.*$",""),"(%2520| |\+)+-xxx.*$","");
Just wondering when/if req.hash can be used like the above error (or,
with the new "log" feature)?
-T.
_______________________________________________
varnish-dev mailing list
[email protected]
http://lists.varnish-cache.org/mailman/listinfo/varnish-dev