-
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
S3 PutObject is missing a Content-MD5 header when writing to a bucket with a default object lock configuration #1694
Comments
@huubvdw, your investigation and PR are appreciated. Unfortunately, S3 and the SDK teams are aware of the issue and have discussed options internally, but for now, you'll have to supply your own
|
Hi everyone, I am having the same issue and was wondering where can I supply my own ContentMD5 parameter for s3fs to work correctly while using guidance ? I tried s3fs with -o enable_content_md5 with no success Thank you! |
This suggestion of passing contentMD5 with PutObject() request assumes that the data we want to write as an object in AWS is available as a file locally so that we can pre-compute the MD5 on the content. For cases where we're generating data on the fly and providing it as an input stream to PutObject() request, how do we get the MD5 to pass alongwith? Also, how does this work when using MultiPartUpload for large objects? |
It appears that the Does the field still exist, even though it's not in the docs? |
Can't find it listed but in the
|
I calculate the MD5 and set it as the header, file by file:
Not nice, but works :-) |
When writing a new object to a bucket with a default object lock configuration, the request will result is a 400 bad request response.
InvalidRequest: Content-MD5 HTTP header is required for Put Object requests with Object Lock parameters
I noticed in ApplyChecksumMiddleware the PutObject operation only sets a sha256 content hash header.
As you don't know upfront if a bucket has a object lock configuration, I'm thinking of setting both the sha256 content hash header and the content MD5 header for the PutObject operation.
Any other suggestions?
The text was updated successfully, but these errors were encountered: