jorgehermo9 commented on code in PR #5274:
URL: https://github.com/apache/opendal/pull/5274#discussion_r1826560268


##########
core/src/services/oss/core.rs:
##########
@@ -213,28 +213,11 @@ impl OssCore {
     /// # Notes
     ///
     /// before return the user defined metadata, we'll strip the 
user_metadata_prefix from the key
-    pub fn parse_metadata(
-        &self,
-        path: &str,
-        user_metadata_prefix: &str,
-        headers: &HeaderMap,
-    ) -> Result<Metadata> {
+    pub fn parse_metadata(&self, path: &str, headers: &HeaderMap) -> 
Result<Metadata> {

Review Comment:
   In the `azblob` and `s3` services, this code is done in the `backend` module 
https://github.com/apache/opendal/blob/4d6057ba266a2a71182a2d547d8665a9892a5787/core/src/services/azblob/backend.rs#L552
   
   But in the `oss` it is done in this `parse_metadata` function in the `core` 
module and called from the `backend` module 
https://github.com/apache/opendal/blob/4d6057ba266a2a71182a2d547d8665a9892a5787/core/src/services/oss/backend.rs#L492
   
   I think we should unify this in order to be consistent.
   
   In my opinion, maybe we can create a new `pub fn 
parse_prefixed_metadata(path:&str, headers: &HeaderMap, prefix: &str)` in the 
`crate::raw::http_util::header` module that contains the code from this 
`parse_metadata` funtion, and then call that `parse_prefixed_metadata` in the 
`backend` module of those three services
   
   What do you think?



-- 
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-unsubscr...@opendal.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to