Hello Tom,
>> Accordingly, I borrowed some code from that thread and present
>> the attached revision. I also added some test coverage, since
>> that was lacking before, and wordsmithed docs and comments slightly.
>
> Hearing no comments, pushed that way.
Thanks for the fixes and improvements!
I notice that buf.data is not freed. I guess that the server memory
management will recover it.
--
Fabien.