Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions http/httpclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ func (jc *HttpClient) createReq(method, url string, content []byte) (req *http.R

func (jc *HttpClient) doRequest(req *http.Request, content []byte, followRedirect bool, closeBody bool, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, respBody []byte, redirectUrl string, err error) {
log.Debug(fmt.Sprintf("Sending HTTP %s request to: %s", req.Method, req.URL))
req.Close = true
setAuthentication(req, httpClientsDetails)
addUserAgentHeader(req)
copyHeaders(httpClientsDetails, req)
Expand Down Expand Up @@ -338,7 +337,6 @@ func (jc *HttpClient) UploadFileFromReader(reader io.Reader, url string, httpCli
return
}
req.ContentLength = size
req.Close = true

setRequestHeaders(httpClientsDetails, size, req)
setAuthentication(req, httpClientsDetails)
Expand Down
2 changes: 2 additions & 0 deletions http/httpclient/clientBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ func (builder *httpClientBuilder) createDefaultHttpTransport() *http.Transport {
KeepAlive: 20 * time.Second,
DualStack: true,
}).DialContext,
ForceAttemptHTTP2: true,
MaxIdleConns: 100,
MaxIdleConnsPerHost: 6, // Increased from default (2) to common default (6) of main web browsers to improve performance when making multiple requests to the same host.
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
Expand Down
Loading