curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Unit test 1655

From: Niall O'Reilly via curl-library <>
Date: Wed, 13 Nov 2019 14:07:23 +0000

On 13 Nov 2019, at 13:41, Daniel Stenberg wrote:

> Is there a reason the DoH code can't just use with exactly the host
> name it gets passed, using a trailing dot or not?

That’s pretty-well the answer I was looking for.

I’m not aware of a compelling reason that it shouldn’t be tolerant,
just as you suggest, but wanted to be sure that I wasn’t missing

Whether the trailing dot is present or not has to be taken into account
if an exact estimate (rather than a safe over-estimate) of the required
buffer size (constant `expected_len` in `doh_encode()`) is required.

For example, `“”` and `“”`, although of
lengths as strings, are both encoded as the same QNAME

For accommodating corner cases, and for keeping the unit test as simple
as possible, I think I’ll add some complexity into the estimation of


Received on 2019-11-13