@miek This is me again 😅
Using DoH, I get a weird EOF error during the dnshttp.Response conversion of the HTTP response.
The response was sent using the dnshttp.ResponseWriter implementation.
Digging into the implementation of the ResponseWriter, I see that you truncate the two leading bytes (response size) of TCP answers: https://codeberg.org/miekg/dns/src/tag/v0.6.5/dnshttp/response.go#L39
However, you also send that the content-length is the length without the "minus 2" operation. https://codeberg.org/miekg/dns/src/tag/v0.6.5/dnshttp/response.go#L36
I was able to confirm that my HTTP response body is 128 bytes long and the content-length is said to be 130 bytes.
Have you been able to use this successfully in the past or am I missing something?
The response was generated using a handler that was successful over DoT and "classic" DNS, but my error could be in my HTTP handler.





