forked from TrueCloudLab/frostfs-s3-gw
[#486] Fix PUT encrypted object
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
c02f8b3ca3
commit
c2e313d899
1 changed files with 2 additions and 1 deletions
|
@ -267,7 +267,8 @@ func (n *Layer) PutObject(ctx context.Context, p *PutObjectParams) (*data.Extend
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(p.ContentMD5) > 0 {
|
|
||||||
|
if !p.Encryption.Enabled() && len(p.ContentMD5) > 0 {
|
||||||
headerMd5Hash, err := base64.StdEncoding.DecodeString(p.ContentMD5)
|
headerMd5Hash, err := base64.StdEncoding.DecodeString(p.ContentMD5)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, apiErrors.GetAPIError(apiErrors.ErrInvalidDigest)
|
return nil, apiErrors.GetAPIError(apiErrors.ErrInvalidDigest)
|
||||||
|
|
Loading…
Reference in a new issue