-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
put_object_retention returns "Missing required header for this request: Content-Md5. (Aws::S3::Errors::MissingContentMD5)" #3192
Comments
Thanks for opening an issue. I am investigating. What version of aws-sdk-core are you using? |
Thanks, here is the excerpt from our Gemfile.lock:
|
I'm not able to reproduce this using the latest core and s3. After creating a bucket with object versioning and locking, I make a request just fine. Can you try updating all of your S3 gems? |
Are you using a third party provider by chance? |
We will test this with the newest version of the SDK. In our tests we are using minio and in production also NetApp but this seems to be a client issue as there is not even a request sent. |
Ah, so you are using 3rd party clients. See this issue here: #3166. The third party provider will need to accept other checksums and not just md5, such as crc32, which the client will send by default. You have two options - pin your sdk to the version before, or you can drop in a plugin like in this issue: #3167 |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Thanks for the hints and link, appreciated. While we understand the integrity protection goal for data up- and downloads, other API interactions which do not transport object content (and are not mentioned in https://docs.aws.amazon.com/sdkref/latest/guide/feature-dataintegrity.html) do not seem to benefit from this and thus the effect is even more confusing. However it seems that this change is very surprising and has a bad smell on it (compatibility issues with other S3 API providers) - it was not even marked as breaking change.. |
In this particular case, it was the removal of md5 less so than the data integrity check (we are supplementing crc32 here by default because that is how s3 modeled their changes). I understand your sentiment. The AWS SDKs are intended to be used with AWS products. 3rd party providers were called out as a risk but S3 continued with their decision. |
Describe the bug
When trying to prolong a
retain_until_date
of a specific object version usingput_object_retention
, I get an error about a missing headerContent-MD5
. However the SDK doc states that this header should be calculated automatically.Here is a sample of the code:
This code produces the error
Missing required header for this request: Content-Md5. (Aws::S3::Errors::MissingContentMD5)
Regression Issue
Expected Behavior
I expect this to set the new
retain_until_date
.Current Behavior
The error
Missing required header for this request: Content-Md5. (Aws::S3::Errors::MissingContentMD5)
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-s3 (1.178.0)
Environment details (Version of Ruby, OS environment)
3.2.6, Linux
The text was updated successfully, but these errors were encountered: