Skip to content

Commit 9b96bf1

Browse files
donatelloharshavardhana
authored andcommitted
Fix signature mismatch in putobject in python3 (Fixes #435) (#436)
1 parent 78be131 commit 9b96bf1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

minio/signer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ def sign_v4(method, url, region, headers=None, access_key=None,
199199
if content_sha256 is None:
200200
# with no payload, calculate sha256 for 0 length data.
201201
content_sha256 = encode_to_hex(get_sha256(b'')).decode('ascii')
202+
elif isinstance(content_sha256, bytes):
203+
content_sha256 = content_sha256.decode('ascii')
202204

203205
host = parsed_url.netloc
204206
headers['Host'] = host

0 commit comments

Comments
 (0)