Digests and data encoding in Varnish
phk at phk.freebsd.dk
Mon Sep 27 13:00:22 CEST 2010
In message <4CA07796.9030101 at schokola.de>, Nils Goroll writes:
>While it would be easy to implement VCL functions (preferrably in a module) for
>such digests always returning a STRING representation with some encoding (base64
>or whatever), for the VSLP director (which I briefly introduced here some time
>ago and which we will publish when an important rewrite is done), it would be
>really handy to also get an INT (or, more specifically, UINT32) representation
Compared to the any sensible digest algorithm, the string encoding is
totally nonvisible in the cpu-usage, so I am not convinced that it is
worth the hazzle of adding new datatypes to VRT.
I would simply write a vmod with digest functions somewhat like:
and be done with it.
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev