meteorgan commented on code in PR #4881:
URL: https://github.com/apache/opendal/pull/4881#discussion_r1674202057
##########
core/src/services/oss/core.rs:
##########
@@ -225,14 +229,17 @@ impl OssCore {
}
if let Some(cache_control) = args.cache_control() {
- req = req.header(CACHE_CONTROL, cache_control)
+ req = req.header(CACHE_CONTROL, cache_control);
}
- // set sse headers
- req = self.insert_sse_headers(req);
+ if let Some(user_metadata) = args.user_metadata() {
+ for (key, value) in user_metadata {
+ // before insert user defined metadata header, add prefix to
the header name
+ req = req.header(format!("{}{}",
constants::USER_METADATA_PREFIX, key), value)
Review Comment:
According to https://help.aliyun.com/zh/oss/developer-reference/putobject,
the key of user defined metadata has some constrains, should we do some checks
here ? otherwise the `aliyun` might return `SignatureDoesNotMatch` error, which
can be confusing.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]