From 75ccb21ac81a24be04ea84fcf092c8cf65c658b7 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Thu, 30 Nov 2017 16:24:50 +0800 Subject: [PATCH] Add ResponseHeaderTimeout --- doh-client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/doh-client/client.go b/doh-client/client.go index f9d4760..20e6bfe 100644 --- a/doh-client/client.go +++ b/doh-client/client.go @@ -101,6 +101,7 @@ func NewClient(addr, upstream string, bootstraps []string, timeout uint, noECS, DualStack: true, Resolver: bootResolver, }).DialContext + httpTransport.ResponseHeaderTimeout = time.Duration(c.timeout) * time.Second // Most CDNs require Cookie support to prevent DDoS attack cookieJar, err := cookiejar.New(nil) if err != nil { return nil, err }