You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/04/05 15:34:50 UTC
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1859: fix(core): S3 Copy should set SSE headers
Xuanwo commented on code in PR #1859:
URL: https://github.com/apache/incubator-opendal/pull/1859#discussion_r1158689322
##########
core/src/services/s3/backend.rs:
##########
@@ -1457,7 +1457,12 @@ impl S3Backend {
let source = format!("{}/{}", self.bucket, percent_encode_path(&from));
let target = format!("{}/{}", self.endpoint, percent_encode_path(&to));
- let mut req = Request::put(&target)
+ let mut req = Request::put(&target);
+
+ // Set SSE headers.
+ req = self.insert_sse_headers(req, true);
Review Comment:
> It's actually a put_object with an extra header `copy_source`.
If bucket has been configured with SSE, all written object will be encrypted. To copy from it, we need to set `x-amz-copy-source-server-side-encryption-customer-algorithm` and related headers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org