diff --git a/Cargo.toml b/Cargo.toml index 65af02a..8f219b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ base64 = "0.9" bytes = "0.4" encoding_rs = "0.8" futures = "0.1.23" -http = "0.1.10" +http = "0.1.14" hyper = "0.12.13" hyper-old-types = { version = "0.11", optional = true, features = ["compat"] } hyper-tls = { version = "0.3", optional = true } diff --git a/src/connect.rs b/src/connect.rs index cc9ff09..ff890bb 100644 --- a/src/connect.rs +++ b/src/connect.rs @@ -69,7 +69,7 @@ impl Connect for Connector { ndst.set_host(puri.host().expect("proxy target should have host")) .expect("proxy target host should be valid"); - ndst.set_port(puri.port()); + ndst.set_port(puri.port_part().map(|p| p.as_u16())); #[cfg(feature = "default-tls")] {