getHashedPayload get the hexadecimal value of the SHA256 hash of the request payload.
(req http.Request)
| 99 | // getHashedPayload get the hexadecimal value of the SHA256 hash of |
| 100 | // the request payload. |
| 101 | func getHashedPayload(req http.Request) string { |
| 102 | hashedPayload := req.Header.Get("X-Amz-Content-Sha256") |
| 103 | if hashedPayload == "" { |
| 104 | // Presign does not have a payload, use S3 recommended value. |
| 105 | hashedPayload = unsignedPayload |
| 106 | } |
| 107 | return hashedPayload |
| 108 | } |
| 109 | |
| 110 | // getCanonicalHeaders generate a list of request headers for |
| 111 | // signature. |
no test coverage detected