mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Presign content-sha256 should look for query and header (#6046)
This commit is contained in:
parent
36c39d04da
commit
c3a5146422
@ -39,6 +39,9 @@ func skipContentSha256Cksum(r *http.Request) bool {
|
||||
|
||||
if isRequestPresignedSignatureV4(r) {
|
||||
v, ok = r.URL.Query()["X-Amz-Content-Sha256"]
|
||||
if !ok {
|
||||
v, ok = r.Header["X-Amz-Content-Sha256"]
|
||||
}
|
||||
} else {
|
||||
v, ok = r.Header["X-Amz-Content-Sha256"]
|
||||
}
|
||||
@ -62,6 +65,9 @@ func getContentSha256Cksum(r *http.Request) string {
|
||||
// will default to 'UNSIGNED-PAYLOAD'.
|
||||
defaultSha256Cksum = unsignedPayload
|
||||
v, ok = r.URL.Query()["X-Amz-Content-Sha256"]
|
||||
if !ok {
|
||||
v, ok = r.Header["X-Amz-Content-Sha256"]
|
||||
}
|
||||
} else {
|
||||
// X-Amz-Content-Sha256, if not set in signed requests, checksum
|
||||
// will default to sha256([]byte("")).
|
||||
|
Loading…
Reference in New Issue
Block a user