Skip to content

Commit

Permalink
remove sse-s3 header in completeMultipartUpload
Browse files Browse the repository at this point in the history
fixes #1776
  • Loading branch information
harshavardhana committed Feb 27, 2023
1 parent 1a28914 commit 6c30563
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api-put-object-multipart.go
Expand Up @@ -387,6 +387,11 @@ func (c *Client) completeMultipartUpload(ctx context.Context, bucketName, object
return UploadInfo{}, err
}

headers := opts.Header()
if s3utils.IsAmazonEndpoint(*c.endpointURL) {
headers.Del(encrypt.SseGenericHeader)
}

// Instantiate all the complete multipart buffer.
completeMultipartUploadBuffer := bytes.NewReader(completeMultipartUploadBytes)
reqMetadata := requestMetadata{
Expand All @@ -396,7 +401,7 @@ func (c *Client) completeMultipartUpload(ctx context.Context, bucketName, object
contentBody: completeMultipartUploadBuffer,
contentLength: int64(len(completeMultipartUploadBytes)),
contentSHA256Hex: sum256Hex(completeMultipartUploadBytes),
customHeader: opts.Header(),
customHeader: headers,
}

// Execute POST to complete multipart upload for an objectName.
Expand Down

0 comments on commit 6c30563

Please sign in to comment.