Suppress proxy error for truncated responses (#154)
* suppress proxy error for truncated responses * Add proxy truncated error suppression for TCP too
This commit is contained in:
parent
3110306296
commit
3165084a7b
1 changed files with 6 additions and 0 deletions
|
@ -26,9 +26,15 @@ func (p ReverseProxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg, extra []dns.RR)
|
|||
reply, err = middleware.Exchange(p.Client.UDP, r, p.Host)
|
||||
}
|
||||
|
||||
if reply != nil && reply.Truncated {
|
||||
// Suppress proxy error for truncated responses
|
||||
err = nil
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
reply.Compress = true
|
||||
reply.Id = r.Id
|
||||
w.WriteMsg(reply)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue