[#540] Add md5 S3Tests compatability #546
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#546
Loading…
Reference in a new issue
No description provided.
Delete branch "pogpp/frostfs-s3-gw:bugfix/540_md5_header_check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #540
Signed-off-by: Pavel Pogodaev p.pogodaev@yadro.com
Please, fix
make tests
@ -51,0 +64,4 @@
api.ContentMD5: "YWJjMTIzIT8kKiYoKSctPUB+",
}
putEncryptedObjectWithHeadersErr(t, tc, bktName, objName, content, headers, errors.ErrBadDigest)
Why don't we have the same test for regular
PutObject
?@ -299,2 +299,3 @@
return nil, apierr.GetAPIError(apierr.ErrInvalidDigest)
return nil, apierr.GetAPIError(apierr.ErrBadDigest)
}
} else if !p.Encryption.Enabled() && len(p.ContentMD5) == 0 {
I suppose we should distinguish cases where
Contet-Md5
isn't set and set but empty. Error should be occurred in the second casebd1b6f30bb
toc5737b1c1a
@ -501,2 +507,2 @@
//awsCreds := credentials.NewStaticCredentials(AWSAccessKeyID, AWSSecretAccessKey, "")
//signer := v4.NewSigner(awsCreds)
// awsCreds := credentials.NewStaticCredentials(AWSAccessKeyID, AWSSecretAccessKey, "")
// signer := v4.NewSigner(awsCreds)
Do we even need this? Check git blame and remove unused code.
@ -289,2 +289,2 @@
if !p.Encryption.Enabled() && len(p.ContentMD5) > 0 {
headerMd5Hash, err := base64.StdEncoding.DecodeString(p.ContentMD5)
if !p.Encryption.Enabled() && p.ContentMD5 != nil && len(*p.ContentMD5) > 0 {
headerMd5Hash, err := base64.StdEncoding.DecodeString(*p.ContentMD5)
Looks good, I would write
c5737b1c1a
toccc8d72758
New commits pushed, approval review dismissed automatically according to repository settings
ccc8d72758
to8a5b5cb2bb
8a5b5cb2bb
tofb00dff83b