add s3 signature tests and prepare implementation of STREAMING-UNSIGNED-PAYLOAD-TRAILER (#6525)

* add tests for s3 signature

* add test for newSignV4ChunkedReader.Read()

* add glog import
This commit is contained in:
Tom Crasset
2025-02-07 19:54:31 +01:00
committed by GitHub
parent e8d8bfcccc
commit a7b964af96
7 changed files with 208 additions and 8 deletions

View File

@@ -56,9 +56,10 @@ const (
streamingContentSHA256 = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD"
signV4ChunkedAlgorithm = "AWS4-HMAC-SHA256-PAYLOAD"
// http Header "x-amz-content-sha256" == "UNSIGNED-PAYLOAD" indicates that the
// http Header "x-amz-content-sha256" == "UNSIGNED-PAYLOAD" or "STREAMING-UNSIGNED-PAYLOAD-TRAILER" indicates that the
// client did not calculate sha256 of the payload.
unsignedPayload = "UNSIGNED-PAYLOAD"
unsignedPayload = "UNSIGNED-PAYLOAD"
streamingUnsignedPayload = "STREAMING-UNSIGNED-PAYLOAD-TRAILER"
)
// Returns SHA256 for calculating canonical-request.