From 591f570b22855ad861af72116271f826a0d1dcf3 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 18 Feb 2019 06:24:28 +0100 Subject: [PATCH] src/client/http_client.rs: trim path --- src/client/http_client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index c53032c8..48206859 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -79,6 +79,7 @@ impl HttpClient { pub fn get(&self, path: &str) -> Result { + let path = path.trim_matches('/'); let url: Uri = format!("https://{}:8007/{}", self.server, path).parse()?; let ticket = self.login()?; @@ -128,6 +129,7 @@ impl HttpClient { pub fn upload(&self, content_type: &str, body: Body, path: &str) -> Result { + let path = path.trim_matches('/'); let url: Uri = format!("https://{}:8007/{}", self.server, path).parse()?; let ticket = self.login()?;