diff --git a/pkg/http/http.go b/pkg/http/http.go index 5ddc944..0287dee 100644 --- a/pkg/http/http.go +++ b/pkg/http/http.go @@ -26,7 +26,16 @@ func NewClient(logger zerolog.Logger, invoker, host string) *Client { } func (c *Client) GetInternal(relativeURL string) (io.ReadCloser, error) { - client := &http.Client{Timeout: 300 * time.Second} + var transport http.RoundTripper + + transportRaw, ok := http.DefaultTransport.(*http.Transport) + if ok { + transport = transportRaw.Clone() + } else { + transport = http.DefaultTransport + } + + client := &http.Client{Timeout: 300 * time.Second, Transport: transport} start := time.Now() fullURL := fmt.Sprintf("%s%s", c.Host, relativeURL)