Переглянути джерело

Merge pull request #435 from Malvineous/patch-1

Allow use of HTTP proxies listening on port 80
Sasha Hilton 5 роки тому
батько
коміт
b86c317ac9
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/main.rs

+ 1 - 1
src/main.rs

@@ -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");
                             }
                             }