mockersf / jenkins-api.rs

Rust client for Jenkins API
MIT License
26 stars 17 forks source link

Bug: http urls get converted to https, causing issues when parsing path items #66

Open jmrgibson opened 3 years ago

jmrgibson commented 3 years ago

This is possibly due to some weird VPN settings on my part, but if you create a client using a http:// url, at some point JenkinsClient.url gets converted to https://, which means the let path = if url.starts_with(&self.url) { check [1] at the start of url_to_path doesn't remove the hostname, and all paths end up as Path::Raw.

[1] https://github.com/mockersf/jenkins-api.rs/blob/master/src/client_internals/path.rs#L235