The DoH endpoint URL in dig might get prepared in wrong format
One of the causes why the problem #2858 (closed) appeared is that the URL in the DoH code might get generated in wrong format at least when IPv6 is used. In particular, in the issue
dig was trying to connect to
https://::1:444/dns-query instead of
https://[::1]:444/dns-query. Obviously, this issue prevents
dig from querying servers via its IPv6 addresses (querying hostnames available via IPv6 works fine).
Also, it will always generate a URL starting with
https:// regardless of the fact if we use HTTP with encryption or not.
So, while the fix for the problem reported is already prepared (!5319 (merged)), this issue needs to be taken care of as well. The code which prepared the URL needs to be revisited.