pierresouchay / consul-rust

Rust client libray for Consul HTTP API
Apache License 2.0
92 stars 48 forks source link

More robust handling of config.address #62

Open tomers opened 3 years ago

tomers commented 3 years ago

Relevant code:

let url_str = format!("{}{}", config.address, path);

In my case config.address is 172.17.0.1:8500, and path is foo/bar, which makes 172.17.0.1:8500foo.bar, and result in Failed to parse URL. I am not sure we should expect our users to have a slash suffix. Our code should be more tolerant in that respect.