From 2d7ac734efd4765ee5bba5d97ef4a53712dce947 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 23 Nov 2021 23:05:51 +0800 Subject: [PATCH] dumpling/gcs: fix http client credential problem (#395) (#397) --- v4/export/config.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/v4/export/config.go b/v4/export/config.go index 188b17f8..6d35eca8 100644 --- a/v4/export/config.go +++ b/v4/export/config.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "net/http" "regexp" "strconv" "strings" @@ -527,18 +526,8 @@ func (conf *Config) createExternalStorage(ctx context.Context) (storage.External if err != nil { return nil, errors.Trace(err) } - httpClient := http.DefaultClient - httpClient.Timeout = 30 * time.Second - maxIdleConnsPerHost := http.DefaultMaxIdleConnsPerHost - if conf.Threads > maxIdleConnsPerHost { - maxIdleConnsPerHost = conf.Threads - } - transport := http.DefaultTransport.(*http.Transport).Clone() - transport.MaxIdleConnsPerHost = maxIdleConnsPerHost - httpClient.Transport = transport return storage.New(ctx, b, &storage.ExternalStorageOptions{ - HTTPClient: httpClient, SkipCheckPath: true, SendCredentials: false, })