httpclient/http.go
func (d *dumpClient) getClientWithoutTimeout() *http.Client {
	// Get a copy of the client and modify as multiple concurrent go routines can be using this client.
	client := *d.Client
	tr, ok := client.Transport.(*http.Transport)
	if ok {
		// note that the http.Transport struct has internal mutex fields that are
		// not safe to copy. we have to be selective in copying fields.
		trCopy := &http.Transport{
			Proxy:                  tr.Proxy,
			DialContext:            tr.DialContext,
			Dial:                   tr.Dial,
			DialTLS:                tr.DialTLS,
			TLSClientConfig:        tr.TLSClientConfig,
			TLSHandshakeTimeout:    tr.TLSHandshakeTimeout,
			DisableKeepAlives:      tr.DisableKeepAlives,
			DisableCompression:     tr.DisableCompression,
			MaxIdleConns:           tr.MaxIdleConns,
			MaxIdleConnsPerHost:    tr.MaxIdleConnsPerHost,
			IdleConnTimeout:        tr.IdleConnTimeout,
			ResponseHeaderTimeout:  0, // explicitly zeroed-out
			ExpectContinueTimeout:  tr.ExpectContinueTimeout,
			TLSNextProto:           tr.TLSNextProto,
			MaxResponseHeaderBytes: tr.MaxResponseHeaderBytes,
		}
		tr = trCopy
	} else {
		// note that the following code has a known issue in that it depends on the
		// current value of the NoCertCheck global. if that global changes after
		// creation of this client then the behavior is undefined.
		tr = &http.Transport{Proxy: http.ProxyFromEnvironment}
		tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: NoCertCheck}
	}
	client.Transport = tr
	return &client
}
func (d *dumpClient) getClientWithoutTimeout() *http.Client {
	// Get a copy of the client and modify as multiple concurrent go routines can be using this client.
	client := *d.Client
	tr, ok := client.Transport.(*http.Transport)
	if ok {
		// note that the http.Transport struct has internal mutex fields that are
		// not safe to copy. we have to be selective in copying fields.
		trCopy := &http.Transport{
			Proxy:                  tr.Proxy,
			DialContext:            tr.DialContext,
			Dial:                   tr.Dial,
			DialTLS:                tr.DialTLS,
			TLSClientConfig:        tr.TLSClientConfig,
			TLSHandshakeTimeout:    tr.TLSHandshakeTimeout,
			DisableKeepAlives:      tr.DisableKeepAlives,
			DisableCompression:     tr.DisableCompression,
			MaxIdleConns:           tr.MaxIdleConns,
			MaxIdleConnsPerHost:    tr.MaxIdleConnsPerHost,
			IdleConnTimeout:        tr.IdleConnTimeout,
			ResponseHeaderTimeout:  0, // explicitly zeroed-out
			ExpectContinueTimeout:  tr.ExpectContinueTimeout,
			TLSNextProto:           tr.TLSNextProto,
			MaxResponseHeaderBytes: tr.MaxResponseHeaderBytes,
		}
		tr = trCopy
	} else {
		// note that the following code has a known issue in that it depends on the
		// current value of the NoCertCheck global. if that global changes after
		// creation of this client then the behavior is undefined.
		tr = &http.Transport{Proxy: http.ProxyFromEnvironment}
		tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: NoCertCheck}
	}
	client.Transport = tr
	return &client
}
// getClientWithoutTimeout returns a modified client that doesn't have the ResponseHeaderTimeout field set
// in its Transport.