Cache request body and user-accesible functions.

Federico Schwindt fgsch at lodoss.net
Wed Mar 4 00:40:38 CET 2015


That sounds good and will work for hash_data() and things like hashing.

Any thoughts on regex operations? Also, is this 4.1 material?



On Tue, Mar 3, 2015 at 10:39 AM, Poul-Henning Kamp <phk at phk.freebsd.dk>
wrote:

> --------
> In message <
> CAJV_h0ZHZtm50LXZZ6pNJVJRVpnmYKuWWHw+xL3t+C4v8ryMAw at mail.gmail.com>
> , Federico Schwindt writes:
>
> As an initial observation I think req.body can only have type BLOB.
>
> Anything else is just asking for problems I don't want to have, or
> involves so much special-casing that it's painful to even think about.
>
> >hash_data(req.body);
> >
> >In this case hash_data()  will internally know what (length) to use.  This
> >might work in Varnish core but will require specific handling outside
> >though.
>
> So one way to do that would be to make req.body be a BLOB, and make it
> hash_data(STRING|BLOB).  That requires serious VCC hacking and will
> cause code duplication (ie: hash_data__string(), hash_data__blob() etc.)
>
> Another way of getting the same effect, which may need less VCC
> hacking, makes it hash_data(BLOB), and adds a general (automatic)
> conversion from STRING to BLOB (just like we have for <ANYTYPE> -> STRING
> today.)
>
> --
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20150303/1d8a67a1/attachment.html>


More information about the varnish-dev mailing list