<div dir="ltr">That sounds good and will work for hash_data() and things like hashing.<br><br>Any thoughts on regex operations? Also, is this 4.1 material?<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 10:39 AM, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">--------<br>
In message <<a href="mailto:CAJV_h0ZHZtm50LXZZ6pNJVJRVpnmYKuWWHw%2BxL3t%2BC4v8ryMAw@mail.gmail.com">CAJV_h0ZHZtm50LXZZ6pNJVJRVpnmYKuWWHw+xL3t+C4v8ryMAw@mail.gmail.com</a>><br>
, Federico Schwindt writes:<br>
<br>
As an initial observation I think req.body can only have type BLOB.<br>
<br>
Anything else is just asking for problems I don't want to have, or<br>
involves so much special-casing that it's painful to even think about.<br>
<span class=""><br>
>hash_data(req.body);<br>
><br>
>In this case hash_data()  will internally know what (length) to use.  This<br>
>might work in Varnish core but will require specific handling outside<br>
>though.<br>
<br>
</span>So one way to do that would be to make req.body be a BLOB, and make it<br>
hash_data(STRING|BLOB).  That requires serious VCC hacking and will<br>
cause code duplication (ie: hash_data__string(), hash_data__blob() etc.)<br>
<br>
Another way of getting the same effect, which may need less VCC<br>
hacking, makes it hash_data(BLOB), and adds a general (automatic)<br>
conversion from STRING to BLOB (just like we have for <ANYTYPE> -> STRING<br>
today.)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG         | TCP/IP since RFC 956<br>
FreeBSD committer       | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
</font></span></blockquote></div><br></div>