middleware/httpproxy: add debug queries (#446)
* middleware/httproxy: implement debug queries Not too useful at the moment, but o-o.debug queries are supported and return the Comment from dns.google.com. Note that this is not always set. * improve documentation * Testing cleanups
This commit is contained in:
parent
a1b9f96d87
commit
4cfd19c7c9
12 changed files with 108 additions and 55 deletions
|
@ -27,9 +27,9 @@ func (p *Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
|||
start := time.Now()
|
||||
state := request.Request{W: w, Req: r}
|
||||
|
||||
reply, backendErr := p.e.Exchange(r)
|
||||
reply, backendErr := p.e.Exchange(state)
|
||||
|
||||
if backendErr == nil {
|
||||
if backendErr == nil && reply != nil {
|
||||
state.SizeAndDo(reply)
|
||||
|
||||
w.WriteMsg(reply)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue