mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-05-25 12:04:09 +00:00
Remove dns.ErrTruncated according to https://github.com/miekg/dns/pull/815
This commit is contained in:
@@ -273,7 +273,7 @@ func (c *Client) handlerFunc(w dns.ResponseWriter, r *dns.Msg, isTCP bool) {
|
||||
} else {
|
||||
reply, _, err = c.tcpClient.Exchange(r, upstream)
|
||||
}
|
||||
if err == nil || err == dns.ErrTruncated {
|
||||
if err == nil {
|
||||
w.WriteMsg(reply)
|
||||
return
|
||||
}
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ func (c *Client) parseResponseIETF(ctx context.Context, w dns.ResponseWriter, r
|
||||
|
||||
fullReply := new(dns.Msg)
|
||||
err = fullReply.Unpack(body)
|
||||
if err != nil && err != dns.ErrTruncated {
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
req.reply.Rcode = dns.RcodeServerFailure
|
||||
w.WriteMsg(req.reply)
|
||||
|
||||
Reference in New Issue
Block a user