# HG changeset patch # User Alain Mazy # Date 1644901307 -3600 # Node ID a25b4140e7e41bde5747ef170c88f299b19ed00b # Parent 4a747c76ae3b3e3df6456492cf4861d0be4131e1 AWS: added the content MD5 in the request when writing diff -r 4a747c76ae3b -r a25b4140e7e4 Aws/AwsS3StoragePlugin.cpp --- a/Aws/AwsS3StoragePlugin.cpp Mon Sep 06 16:54:42 2021 +0200 +++ b/Aws/AwsS3StoragePlugin.cpp Tue Feb 15 06:01:47 2022 +0100 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -88,6 +89,7 @@ stream->seekg(0); putObjectRequest.SetBody(stream); + putObjectRequest.SetContentMD5(Aws::Utils::HashingUtils::Base64Encode(Aws::Utils::HashingUtils::CalculateMD5(*stream))); auto result = client_.PutObject(putObjectRequest); diff -r 4a747c76ae3b -r a25b4140e7e4 NEWS --- a/NEWS Mon Sep 06 16:54:42 2021 +0200 +++ b/NEWS Tue Feb 15 06:01:47 2022 +0100 @@ -1,3 +1,9 @@ +Pending changes in the mainline +=============================== + +* AWS: added the content MD5 in the request when writing. This adds integrity check and enables some feature on AWS side + like https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-overview.html + 2021-09-06 - v 1.3.3 ====================