Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/zipartifacts/open_archive.go')
-rw-r--r--workhorse/internal/zipartifacts/open_archive.go20
1 files changed, 4 insertions, 16 deletions
diff --git a/workhorse/internal/zipartifacts/open_archive.go b/workhorse/internal/zipartifacts/open_archive.go
index cf0e38e9ee0..ec2fd691038 100644
--- a/workhorse/internal/zipartifacts/open_archive.go
+++ b/workhorse/internal/zipartifacts/open_archive.go
@@ -5,32 +5,20 @@ import (
"context"
"fmt"
"io"
- "net"
"net/http"
"os"
"strings"
- "time"
+ "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/httprs"
- "gitlab.com/gitlab-org/labkit/correlation"
"gitlab.com/gitlab-org/labkit/mask"
- "gitlab.com/gitlab-org/labkit/tracing"
)
var httpClient = &http.Client{
- Transport: tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{
- Proxy: http.ProxyFromEnvironment,
- DialContext: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 10 * time.Second,
- }).DialContext,
- IdleConnTimeout: 30 * time.Second,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 10 * time.Second,
- ResponseHeaderTimeout: 30 * time.Second,
- DisableCompression: true,
- })),
+ Transport: httptransport.New(
+ httptransport.WithDisabledCompression(), // To avoid bugs when serving compressed files from object storage
+ ),
}
type archive struct {