mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Allow use of HTTP proxies listening on port 80
Since port 80 is the default port for the HTTP protocol, `url.port()` returns `None`, causing an "invalid proxy" message. Using `port_or_known_default()` will only return `None` if the both the port has been omitted and an unknown protocol has been specified.
This commit is contained in:
parent
08c239319c
commit
63cc846a10
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ fn setup(args: &[String]) -> Setup {
|
||||||
|s| {
|
|s| {
|
||||||
match Url::parse(&s) {
|
match Url::parse(&s) {
|
||||||
Ok(url) => {
|
Ok(url) => {
|
||||||
if url.host().is_none() || url.port().is_none() {
|
if url.host().is_none() || url.port_or_known_default().is_none() {
|
||||||
panic!("Invalid proxy url, only urls on the format \"http://host:port\" are allowed");
|
panic!("Invalid proxy url, only urls on the format \"http://host:port\" are allowed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue