From 9b96bf1363917621a53b1969e528d5a59f22de8c Mon Sep 17 00:00:00 2001 From: Aditya Manthramurthy Date: Fri, 9 Dec 2016 10:41:03 +0530 Subject: [PATCH] Fix signature mismatch in putobject in python3 (Fixes #435) (#436) --- minio/signer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/minio/signer.py b/minio/signer.py index 3db2de47c..9cfdcea42 100644 --- a/minio/signer.py +++ b/minio/signer.py @@ -199,6 +199,8 @@ def sign_v4(method, url, region, headers=None, access_key=None, if content_sha256 is None: # with no payload, calculate sha256 for 0 length data. content_sha256 = encode_to_hex(get_sha256(b'')).decode('ascii') + elif isinstance(content_sha256, bytes): + content_sha256 = content_sha256.decode('ascii') host = parsed_url.netloc headers['Host'] = host