Skip to content
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

Update s3.cc to add Content-MD5 header to V4 S3 api #1522

Open
wants to merge 1 commit into
base: 8.0
Choose a base branch
from

Conversation

vovler
Copy link

@vovler vovler commented Nov 9, 2023

Content-MD5 header is required for the PutObject in case Object Lock is activated as per:
https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html

The Content-MD5 header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock.

I've only tested with Backblaze's S3 V4 compatible API, which throws this error while uploading to a Object Locked bucket :
xbcloud: S3 error message: Missing required header for this request: Content-MD5

So I'm not sure if Amazon S3 will throw the same error or not, but from their API docs, it seems to be required as well.

I've compiled the code to test the change with Backblaze and it's working as intended.

…ckblaze upload incase Object Lock is activated
@it-percona-cla
Copy link

it-percona-cla commented Nov 9, 2023

CLA assistant check
All committers have signed the CLA.

@altmannmarcelo
Copy link
Contributor

Hi @vovler .
Thanks for your contribution. I have created a proper ticket for your contribution and will get it reviewed as time allows.
https://jira.percona.com/browse/PXB-3199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants