Skip to content

Commit 547f1bf

Browse files
committed
Add EnableMD5 for upload_part
1 parent 557076c commit 547f1bf

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

qcloud_cos/cos_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,6 @@ def upload_part(self, Bucket, Key, Body, PartNumber, UploadId, EnableMD5=False,
598598
auth=CosS3Auth(self._conf._secret_id, self._conf._secret_key, Key),
599599
data=Body)
600600
response = dict()
601-
logger.debug("local md5: {key}".format(key=rt.headers['ETag'][1:-1]))
602-
logger.debug("cos md5: {key}".format(key=md5(Body).hexdigest()))
603-
if md5(Body).hexdigest() != rt.headers['ETag'][1:-1]:
604-
raise CosClientError("MD5 inconsistencies")
605601
response['ETag'] = rt.headers['ETag']
606602
return response
607603

0 commit comments

Comments
 (0)