Skip to content

Commit e9fb40e

Browse files
authored
Merge pull request #28 from belousovAV/fix-blank-payload
sha256 should be present for blank payload too
2 parents 1e8944d + bf1f559 commit e9fb40e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/aws_auth/authorization_header.ex

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ defmodule AWSAuth.AuthorizationHeader do
1818

1919
headers = Map.put_new(headers, "host", uri.host)
2020

21-
payload = case payload do
22-
"" -> ""
23-
_ -> AWSAuth.Utils.hash_sha256(payload)
24-
end
21+
payload = AWSAuth.Utils.hash_sha256(payload)
2522

2623
headers = Map.put_new(headers, "x-amz-content-sha256", payload)
2724

0 commit comments

Comments
 (0)