-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(services/cos): Added user metadata support for cos service #5510
base: main
Are you sure you want to change the base?
Conversation
@Xuanwo can you plz look into this PR. |
core/src/services/cos/core.rs
Outdated
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 | ||
if !self.check_user_metadata_key(key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm not sure if it's a good idea to check user's metadata key. Let's skip it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
core/src/services/cos/core.rs
Outdated
/// # Notes | ||
/// | ||
/// before return the user defined metadata, we'll strip the user_metadata_prefix from the key | ||
pub fn parse_metadata(&self, path: &str, headers: &HeaderMap) -> Result<Metadata> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this function might be slightly overengineered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by overengineered? What do I need to change in this fn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I would like to remove this function and expand it instead.
@Xuanwo I have made the changes that you suggested. |
Which issue does this PR close?
Closes cos service task for #4842 .
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?