Repository: elastic-rs/elastic (language: rust)

Issue:
Strip trailing slashes in NodeAddress
Having a trailing slash in the node address causes issues; see #402 for more info.


Discussion / hints:

Fix patch:
diff --git a/src/elastic/src/http/sender/mod.rs b/src/elastic/src/http/sender/mod.rs
index ed53be16af..5992e68cf2 100644
--- a/src/elastic/src/http/sender/mod.rs
+++ b/src/elastic/src/http/sender/mod.rs
@@ -151,7 +151,7 @@ where
     T: Into<Arc<str>>,
 {
     fn from(address: T) -> Self {
-        NodeAddress(address.into())
+        NodeAddress(address.into().trim_end_matches('/').into())
     }
 }
 


Test patch: