Skip to content

Commit 5acae3c

Browse files
committed
Make some debug output
1 parent 532261d commit 5acae3c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/dns/nameserver_doh.go

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"crypto/tls"
77
"fmt"
88
"io"
9+
golog "log"
910
"net/http"
1011
"net/url"
1112
"strings"
@@ -276,6 +277,7 @@ func (s *DoHNameServer) sendQuery(ctx context.Context, domain string, clientIP n
276277
func (s *DoHNameServer) dohHTTPSContext(ctx context.Context, b []byte) ([]byte, error) {
277278
body := bytes.NewBuffer(b)
278279
req, err := http.NewRequest("POST", s.dohURL, body)
280+
golog.Println("request body size: ", len(body.Bytes()))
279281
if err != nil {
280282
return nil, err
281283
}
@@ -287,10 +289,13 @@ func (s *DoHNameServer) dohHTTPSContext(ctx context.Context, b []byte) ([]byte,
287289

288290
hc := s.httpClient
289291

292+
golog.Println("taking request")
290293
resp, err := hc.Do(req.WithContext(ctx))
291294
if err != nil {
295+
golog.Println("err req: ", err)
292296
return nil, err
293297
}
298+
golog.Println("req done")
294299

295300
defer resp.Body.Close()
296301
if resp.StatusCode != http.StatusOK {

0 commit comments

Comments
 (0)