You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
S3Client::DeleteObjects API fails with missing Content-MD5 error #1337
The DeleteObjects fails with "Missing required header for this request: Content-MD5". I can see in the logs that the Content-MD5 header is not populated. I would have expected that to be set by the client library.
Hi @satyamshekhar ,
I'm not able to replicate this issue, using your sample code I was able to delete objects from my s3 bucket.
Is there any other steps you might know of that makes your case special? Things like permissions, maybe special values in your s3 objects/buckets, or something of the sort?
Nothing that I can think of. Does the value in the bucket matter? It is hard to imagine why the client would not send the "Content-MD5" based on bucket setting?
It shouldn't but I can't see anything weird in the sample code you provided that would be causing this error, so I'm assuming this is either due to some bucket or client configuration, permissions or object size.
Couple things I'd like you to try,
Change std::set<std:string> to std::set<Aws::string>
In your logs it looks like you're doing some uploads, can you try just testing out the delete and see if you still get the same error?
The client exhibits this behavior when the number of objects to be deleted in |Delete| is zero. The error message is misleading. The client should either return early in such a case or still send a valid request with Content-MD5 to the server.
I have fixed the problem locally by checking if the number of objects to deleted is 0.
Activity
KaibaLopez commentedon Mar 5, 2020
Hi @satyamshekhar ,
I'm not able to replicate this issue, using your sample code I was able to delete objects from my s3 bucket.
Is there any other steps you might know of that makes your case special? Things like permissions, maybe special values in your s3 objects/buckets, or something of the sort?
satyamshekhar commentedon Mar 5, 2020
Nothing that I can think of. Does the value in the bucket matter? It is hard to imagine why the client would not send the "Content-MD5" based on bucket setting?
KaibaLopez commentedon Mar 5, 2020
It shouldn't but I can't see anything weird in the sample code you provided that would be causing this error, so I'm assuming this is either due to some bucket or client configuration, permissions or object size.
Couple things I'd like you to try,
std::set<std:string>tostd::set<Aws::string>satyamshekhar commentedon Mar 6, 2020
The client exhibits this behavior when the number of objects to be deleted in |Delete| is zero. The error message is misleading. The client should either return early in such a case or still send a valid request with Content-MD5 to the server.
I have fixed the problem locally by checking if the number of objects to deleted is 0.