You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "wForget (via GitHub)" <gi...@apache.org> on 2025/09/01 08:22:53 UTC
Re: [PR] feat(services): Allow endpoint has trailing slash [opendal]
wForget commented on code in PR #282:
URL: https://github.com/apache/opendal/pull/282#discussion_r2313242938
##########
src/services/hdfs/backend.rs:
##########
@@ -77,7 +77,8 @@ impl Builder {
/// - `hdfs://127.0.0.1:9000`: connect to hdfs cluster.
pub fn name_node(&mut self, name_node: &str) -> &mut Self {
if !name_node.is_empty() {
- self.name_node = Some(name_node.to_string())
+ // Trim trailing `/` so that we can accept `http://127.0.0.1:9000/`
+ self.name_node = Some(name_node.trim_end_matches('/').to_string())
Review Comment:
This may break name_node like `file:///`
--
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