Skip to content

Commit

Permalink
Only add encryption headers for for SSE-C in get. (apache#6260)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiachengdb authored Aug 20, 2024
1 parent 344ba1d commit 23b6ff9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion object_store/src/aws/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,14 @@ impl GetClient for S3Client {
};

let mut builder = self.client.request(method, url);
builder = builder.headers(self.config.encryption_headers.clone().into());
if self
.config
.encryption_headers
.0
.contains_key("x-amz-server-side-encryption-customer-algorithm")
{
builder = builder.headers(self.config.encryption_headers.clone().into());
}

if let Some(v) = &options.version {
builder = builder.query(&[("versionId", v)])
Expand Down

0 comments on commit 23b6ff9

Please sign in to comment.