Open stevendanna opened 4 years ago
More discussion around the url
change here: https://github.com/servo/rust-url/issues/577
Uh, that change is not something I'd expect from a patch release. I created a workaround, try 5591cc7ffa135abe818ec5eb812de530de3ba153.
Thanks! I'll give it a try.
Your fix works for me locally, thanks again.
I started looking into whether there was a clean way to add some features upstream for this use case, I'll try to remember to follow up if I make progress on that.
We've recently observed the to_string method returning None with the following warning:
I think I've tracked this down to an incompatibility between env_proxy and the 2.1.1 version of the URL crate.
The following code constructs a new Url with the scheme
xhttp
orxhttps
and then asssume we can callset_scheme
to set it back to the original scheme:https://github.com/inejge/env_proxy/blob/8bcfd3a80ac2f46288b513df7964888438b2e288/src/lib.rs#L175-L197
As of this commit in the url crate, you cannot set the scheme from a non-canonical scheme to a canonical scheme:
https://github.com/servo/rust-url/commit/7efdc53193adfdfd65c1d39bc7ad4762dd4c272b#diff-b4aea3e418ccdb71239b96952d9cddb6R2029-R2077
As a result, the env_proxy to_url function fails in all of the use cases I've tried. The crate's tests also fail when using url 2.1.1+:
But pass if you run them with URL 2.0: