--------
In message <cajv_h0zhztm50lxzz6pnjvjrvpnmykuwwhw+xl3t+c4v8ry...@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
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to