jorgehermo9 commented on code in PR #5274: URL: https://github.com/apache/opendal/pull/5274#discussion_r1826555078
########## core/src/services/azblob/backend.rs: ########## @@ -545,7 +548,17 @@ impl Access for AzblobBackend { let status = resp.status(); match status { - StatusCode::OK => parse_into_metadata(path, resp.headers()).map(RpStat::new), + StatusCode::OK => { + let headers = resp.headers(); + let mut meta = parse_into_metadata(path, headers)?; + + let user_meta = parse_prefixed_headers(&headers, X_MS_META_NAME_PREFIX); + if !user_meta.is_empty() { Review Comment: This check is also done in the s3 backend. Should we always call `meta.with_user_metadata(user_meta);` instead of checking if the `user_meta` is empty? Or can we for example, add that checking inside `meta.with_user_metadata(user_meta);` and do an early return if the `user_meta` hashmap is empty?https://github.com/apache/opendal/blob/19279327a73ffa70f4c5079fd149ab82f7649e15/core/src/types/metadata.rs#L524 I find that checking in each backend if the hashmap is empty is error-prone boilerplate... -- 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