Skip to content

Commit 018d6f3

Browse files
YangSen-qnYangSen-qn
and
YangSen-qn
authored
resumable upload request header add content-length (#163)
* version to 7.25.3 * optimize http request add content length --------- Co-authored-by: YangSen-qn <[email protected]>
1 parent df3d811 commit 018d6f3

File tree

73 files changed

+372
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+372
-90
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Changelog
2+
## 7.25.3
3+
4+
* 修复
5+
* 分片上传请求头增加 Content-Length
6+
27

38
## 7.25.2
49

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ github.com/qiniu/go-sdk
1717
在您的项目中的 `go.mod` 文件内添加这行代码
1818

1919
```
20-
require github.com/qiniu/go-sdk/v7 v7.25.2
20+
require github.com/qiniu/go-sdk/v7 v7.25.3
2121
```
2222

2323
并且在项目中使用 `"github.com/qiniu/go-sdk/v7"` 引用 Qiniu Go SDK。

conf/conf.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"github.com/qiniu/go-sdk/v7/internal/env"
55
)
66

7-
const Version = "7.25.1"
7+
const Version = "7.25.3"
88

99
const (
1010
CONTENT_TYPE_JSON = "application/json"

internal/api-generator/client.go

+27-15
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,6 @@ func (description *ApiDetailedDescription) generatePackage(group *jen.Group, opt
151151
))
152152
}))
153153
}
154-
if description.Request.HeaderNames != nil {
155-
group.Add(
156-
jen.List(jen.Id("headers"), jen.Err()).Op(":=").Id("innerRequest").Dot("buildHeaders").Call(),
157-
)
158-
group.Add(
159-
jen.If(
160-
jen.Err().Op("!=").Nil(),
161-
).BlockFunc(func(group *jen.Group) {
162-
group.Add(jen.Return(jen.Nil(), jen.Err()))
163-
}),
164-
)
165-
}
166154
guessPathSegmentsCount := 0
167155
if description.BasePath != "" {
168156
guessPathSegmentsCount += len(description.getBasePathSegments())
@@ -243,6 +231,22 @@ func (description *ApiDetailedDescription) generatePackage(group *jen.Group, opt
243231
}),
244232
)
245233
}
234+
if description.Request.HeaderNames != nil {
235+
group.Add(
236+
jen.List(jen.Id("headers"), jen.Err()).Op(":=").Id("innerRequest").Dot("buildHeaders").Call(),
237+
)
238+
group.Add(
239+
jen.If(
240+
jen.Err().Op("!=").Nil(),
241+
).BlockFunc(func(group *jen.Group) {
242+
group.Add(jen.Return(jen.Nil(), jen.Err()))
243+
}),
244+
)
245+
} else {
246+
group.Add(
247+
jen.Id("headers").Op(":=").Qual("net/http", "Header").Values(jen.Dict{}),
248+
)
249+
}
246250
if requestBody := description.Request.Body; requestBody != nil {
247251
if json := requestBody.Json; json != nil {
248252
group.Add(
@@ -301,6 +305,16 @@ func (description *ApiDetailedDescription) generatePackage(group *jen.Group, opt
301305
))
302306
}),
303307
)
308+
group.Add(
309+
jen.Id("hErr").Op(":=").Qual(PackageNameUtils, "HttpHeadAddContentLength").Call(jen.Id("headers"), jen.Id("body")),
310+
)
311+
group.Add(
312+
jen.If(
313+
jen.Id("hErr").Op("!=").Nil(),
314+
).Block(
315+
jen.Return(jen.Nil(), jen.Id("hErr")),
316+
),
317+
)
304318
}
305319
}
306320
if isStorageAPIs() {
@@ -405,9 +419,7 @@ func (description *ApiDetailedDescription) generatePackage(group *jen.Group, opt
405419
group.Add(jen.Id("Endpoints").Op(":").Id("options").Dot("OverwrittenEndpoints"))
406420
group.Add(jen.Id("Region").Op(":").Id("options").Dot("OverwrittenRegion"))
407421
group.Add(jen.Id("Interceptors").Op(":").Index().Qual(PackageNameHTTPClient, "Interceptor").Values(jen.Id("uplogInterceptor")))
408-
if description.Request.HeaderNames != nil {
409-
group.Add(jen.Id("Header").Op(":").Id("headers"))
410-
}
422+
group.Add(jen.Id("Header").Op(":").Id("headers"))
411423
switch description.Request.Authorization.ToAuthorization() {
412424
case AuthorizationQbox:
413425
group.Add(jen.Id("AuthType").Op(":").Qual(PackageNameAuth, "TokenQBox"))

internal/api-generator/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const (
1919
PackageNameRegion = "github.com/qiniu/go-sdk/v7/storagev2/region"
2020
PackageNameUpToken = "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
2121
PackageNameErrors = "github.com/qiniu/go-sdk/v7/storagev2/errors"
22+
PackageNameUtils = "github.com/qiniu/go-sdk/v7/storagev2/internal/utils"
2223
PackageNameUplog = "github.com/qiniu/go-sdk/v7/internal/uplog"
2324
PackageNameInternalIo = "github.com/qiniu/go-sdk/v7/internal/io"
2425
)

internal/clientv2/request.go

+15-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"context"
66
"encoding/json"
7+
"fmt"
78
"io"
89
"net/http"
910
"net/url"
@@ -85,7 +86,7 @@ func (o *RequestParams) init() {
8586
func NewRequest(options RequestParams) (req *http.Request, err error) {
8687
var (
8788
bodyWrapper *requestBodyWrapperWithProgress = nil
88-
contentLength uint64
89+
contentLength int64 = 0
8990
)
9091

9192
options.init()
@@ -94,11 +95,17 @@ func NewRequest(options RequestParams) (req *http.Request, err error) {
9495
if err != nil {
9596
return nil, err
9697
}
97-
if options.OnRequestProgress != nil && body != nil {
98+
99+
if body != nil {
98100
if contentLengthHeaderValue := options.Header.Get("Content-Length"); contentLengthHeaderValue != "" {
99-
contentLength, _ = strconv.ParseUint(contentLengthHeaderValue, 10, 64)
101+
contentLength, err = strconv.ParseInt(contentLengthHeaderValue, 10, 64)
102+
if err != nil {
103+
return nil, fmt.Errorf("invalid Content-Length header value: %s, %s", contentLengthHeaderValue, err)
104+
}
105+
}
106+
if options.OnRequestProgress != nil {
107+
bodyWrapper = &requestBodyWrapperWithProgress{body: body, expectedSize: uint64(contentLength), callback: options.OnRequestProgress}
100108
}
101-
bodyWrapper = &requestBodyWrapperWithProgress{body: body, expectedSize: contentLength, callback: options.OnRequestProgress}
102109
}
103110
if bodyWrapper != nil {
104111
req, err = http.NewRequest(options.Method, options.Url, bodyWrapper)
@@ -124,14 +131,17 @@ func NewRequest(options RequestParams) (req *http.Request, err error) {
124131
if bodyWrapper != nil {
125132
return &requestBodyWrapperWithProgress{
126133
body: reqBody,
127-
expectedSize: contentLength,
134+
expectedSize: uint64(contentLength),
128135
callback: options.OnRequestProgress,
129136
}, nil
130137
} else {
131138
return reqBody, nil
132139
}
133140
}
134141
}
142+
if contentLength > 0 {
143+
req.ContentLength = contentLength
144+
}
135145
return
136146
}
137147

storagev2/apis/api_add_bucket_event_rule.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1212
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1313
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
14+
"net/http"
1415
"net/url"
1516
"strings"
1617
"time"
@@ -84,6 +85,7 @@ func (storage *Storage) AddBucketEventRule(ctx context.Context, request *AddBuck
8485
} else {
8586
rawQuery += query.Encode()
8687
}
88+
headers := http.Header{}
8789
bucketName := options.OverwrittenBucketName
8890
if bucketName == "" {
8991
var err error
@@ -105,7 +107,7 @@ func (storage *Storage) AddBucketEventRule(ctx context.Context, request *AddBuck
105107
if err != nil {
106108
return nil, err
107109
}
108-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
110+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
109111
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
110112
bucketHosts := httpclient.DefaultBucketHosts()
111113
if options.OverwrittenBucketHosts != nil {

storagev2/apis/api_add_bucket_rules.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1212
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1313
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
14+
"net/http"
1415
"net/url"
1516
"strconv"
1617
"strings"
@@ -60,6 +61,7 @@ func (storage *Storage) AddBucketRules(ctx context.Context, request *AddBucketRu
6061
pathSegments = append(pathSegments, "rules", "add")
6162
path := "/" + strings.Join(pathSegments, "/")
6263
var rawQuery string
64+
headers := http.Header{}
6365
body, err := innerRequest.build()
6466
if err != nil {
6567
return nil, err
@@ -85,7 +87,7 @@ func (storage *Storage) AddBucketRules(ctx context.Context, request *AddBucketRu
8587
if err != nil {
8688
return nil, err
8789
}
88-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, RequestBody: httpclient.GetFormRequestBody(body), OnRequestProgress: options.OnRequestProgress}
90+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, RequestBody: httpclient.GetFormRequestBody(body), OnRequestProgress: options.OnRequestProgress}
8991
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
9092
bucketHosts := httpclient.DefaultBucketHosts()
9193
if options.OverwrittenBucketHosts != nil {

storagev2/apis/api_async_fetch_object.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1313
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1414
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
15+
"net/http"
1516
"strings"
1617
"time"
1718
)
@@ -58,6 +59,7 @@ func (storage *Storage) AsyncFetchObject(ctx context.Context, request *AsyncFetc
5859
pathSegments = append(pathSegments, "sisyphus", "fetch")
5960
path := "/" + strings.Join(pathSegments, "/")
6061
var rawQuery string
62+
headers := http.Header{}
6163
body, err := httpclient.GetJsonRequestBody(&innerRequest)
6264
if err != nil {
6365
return nil, err
@@ -84,7 +86,7 @@ func (storage *Storage) AsyncFetchObject(ctx context.Context, request *AsyncFetc
8486
if err != nil {
8587
return nil, err
8688
}
87-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, BufferResponse: true, RequestBody: body, OnRequestProgress: options.OnRequestProgress}
89+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, BufferResponse: true, RequestBody: body, OnRequestProgress: options.OnRequestProgress}
8890
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
8991
bucketHosts := httpclient.DefaultBucketHosts()
9092
if bucketName != "" {

storagev2/apis/api_batch_ops.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1212
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1313
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
14+
"net/http"
1415
"net/url"
1516
"strings"
1617
"time"
@@ -57,6 +58,7 @@ func (storage *Storage) BatchOps(ctx context.Context, request *BatchOpsRequest,
5758
pathSegments = append(pathSegments, "batch")
5859
path := "/" + strings.Join(pathSegments, "/")
5960
var rawQuery string
61+
headers := http.Header{}
6062
body, err := innerRequest.build()
6163
if err != nil {
6264
return nil, err
@@ -76,7 +78,7 @@ func (storage *Storage) BatchOps(ctx context.Context, request *BatchOpsRequest,
7678
if err != nil {
7779
return nil, err
7880
}
79-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, BufferResponse: true, RequestBody: httpclient.GetFormRequestBody(body), OnRequestProgress: options.OnRequestProgress}
81+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, BufferResponse: true, RequestBody: httpclient.GetFormRequestBody(body), OnRequestProgress: options.OnRequestProgress}
8082
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
8183
bucketHosts := httpclient.DefaultBucketHosts()
8284
if bucketName != "" {

storagev2/apis/api_check_share.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1212
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1313
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
14+
"net/http"
1415
"net/url"
1516
"strings"
1617
"time"
@@ -75,6 +76,7 @@ func (storage *Storage) CheckShare(ctx context.Context, request *CheckShareReque
7576
} else {
7677
rawQuery += query.Encode()
7778
}
79+
headers := http.Header{}
7880
bucketName := options.OverwrittenBucketName
7981
uplogInterceptor, err := uplog.NewRequestUplog("checkShare", bucketName, "", func() (string, error) {
8082
credentials := innerRequest.Credentials
@@ -90,7 +92,7 @@ func (storage *Storage) CheckShare(ctx context.Context, request *CheckShareReque
9092
if err != nil {
9193
return nil, err
9294
}
93-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
95+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
9496
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
9597
bucketHosts := httpclient.DefaultBucketHosts()
9698
if bucketName != "" {

storagev2/apis/api_copy_object.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1313
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1414
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
15+
"net/http"
1516
"strconv"
1617
"strings"
1718
"time"
@@ -79,6 +80,7 @@ func (storage *Storage) CopyObject(ctx context.Context, request *CopyObjectReque
7980
}
8081
path := "/" + strings.Join(pathSegments, "/")
8182
var rawQuery string
83+
headers := http.Header{}
8284
bucketName := options.OverwrittenBucketName
8385
if bucketName == "" {
8486
var err error
@@ -101,7 +103,7 @@ func (storage *Storage) CopyObject(ctx context.Context, request *CopyObjectReque
101103
if err != nil {
102104
return nil, err
103105
}
104-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
106+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
105107
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
106108
bucketHosts := httpclient.DefaultBucketHosts()
107109
if bucketName != "" {

storagev2/apis/api_create_bucket.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1212
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1313
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
14+
"net/http"
1415
"strings"
1516
"time"
1617
)
@@ -52,6 +53,7 @@ func (storage *Storage) CreateBucket(ctx context.Context, request *CreateBucketR
5253
}
5354
path := "/" + strings.Join(pathSegments, "/")
5455
var rawQuery string
56+
headers := http.Header{}
5557
bucketName := options.OverwrittenBucketName
5658
uplogInterceptor, err := uplog.NewRequestUplog("createBucket", bucketName, "", func() (string, error) {
5759
credentials := innerRequest.Credentials
@@ -67,7 +69,7 @@ func (storage *Storage) CreateBucket(ctx context.Context, request *CreateBucketR
6769
if err != nil {
6870
return nil, err
6971
}
70-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
72+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, OnRequestProgress: options.OnRequestProgress}
7173
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
7274
bucketHosts := httpclient.DefaultBucketHosts()
7375
if options.OverwrittenBucketHosts != nil {

storagev2/apis/api_create_share.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
httpclient "github.com/qiniu/go-sdk/v7/storagev2/http_client"
1313
region "github.com/qiniu/go-sdk/v7/storagev2/region"
1414
uptoken "github.com/qiniu/go-sdk/v7/storagev2/uptoken"
15+
"net/http"
1516
"strings"
1617
"time"
1718
)
@@ -53,6 +54,7 @@ func (storage *Storage) CreateShare(ctx context.Context, request *CreateShareReq
5354
path := "/" + strings.Join(pathSegments, "/")
5455
path += "/"
5556
var rawQuery string
57+
headers := http.Header{}
5658
body, err := httpclient.GetJsonRequestBody(&innerRequest)
5759
if err != nil {
5860
return nil, err
@@ -72,7 +74,7 @@ func (storage *Storage) CreateShare(ctx context.Context, request *CreateShareReq
7274
if err != nil {
7375
return nil, err
7476
}
75-
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, BufferResponse: true, RequestBody: body, OnRequestProgress: options.OnRequestProgress}
77+
req := httpclient.Request{Method: "POST", ServiceNames: serviceNames, Path: path, RawQuery: rawQuery, Endpoints: options.OverwrittenEndpoints, Region: options.OverwrittenRegion, Interceptors: []httpclient.Interceptor{uplogInterceptor}, Header: headers, AuthType: auth.TokenQiniu, Credentials: innerRequest.Credentials, BufferResponse: true, RequestBody: body, OnRequestProgress: options.OnRequestProgress}
7678
if options.OverwrittenEndpoints == nil && options.OverwrittenRegion == nil && storage.client.GetRegions() == nil {
7779
bucketHosts := httpclient.DefaultBucketHosts()
7880
if bucketName != "" {

0 commit comments

Comments
 (0)