Skip to content

Commit 7ca85c6

Browse files
authored
Merge pull request #87 from volcengine/release_v2.7.24
v2.7.24
2 parents 08206eb + 05c16ba commit 7ca85c6

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# ChangeLog of TOS SDK for Go
2+
## 版本号 v2.7.24 日期:2025-10-04
3+
- 优化自定义签名时间和 header 特性
4+
25
## 版本号 v2.7.23 日期:2025-09-26
36
- 支持 GenericInput 设置自定义签名时间和 header
47

tos/consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
const (
99
// Version tos-go-sdk version
10-
Version = "v2.7.23"
10+
Version = "v2.7.24"
1111
)
1212

1313
const TempFileSuffix = ".temp"

tos/sign_v4.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ func (sv *SignV4) doSign(method, path, contentSha256 string, header, query KVs,
229229
func (sv *SignV4) SignHeader(req *Request) http.Header {
230230
signed := make(http.Header, 4)
231231
now := sv.now()
232-
date := now.Format(iso8601Layout)
233-
contentSha256 := req.Header.Get(v4ContentSHA256)
234232
if !req.RequestDate.IsZero() {
235-
date = req.RequestDate.Format(iso8601Layout)
233+
now = req.RequestDate
236234
}
235+
date := now.Format(iso8601Layout)
236+
contentSha256 := req.Header.Get(v4ContentSHA256)
237237

238238
host := req.Host
239239
if req.RequestHost != "" {

0 commit comments

Comments
 (0)