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

Add simpler checksum types #1832

Merged
merged 1 commit into from
May 25, 2023
Merged

Conversation

klauspost
Copy link
Contributor

@klauspost klauspost commented May 25, 2023

Add appropriate types for checksums and add helpers to make usage safer and much easier.

Completely eliminates magic values for the user.

This can be expanded to other calls over time.

AWS is a bit unclear if it supports multiple checksums per call. We don't. p.formData["x-amz-checksum-"+strings.ToLower(k)] = strings.ToUpper(v) would have overwritten the value anyway. So the API takes one checksum per call.

Add appropriate types for checksums and add helpers to make usage easier.

This can be expanded to other calls over time.
Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@harshavardhana harshavardhana merged commit b7cf0a8 into minio:master May 25, 2023
7 checks passed
@klauspost klauspost deleted the add-checksum-types branch May 26, 2023 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants