We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b392b52 + 7c72bc3 commit 65c3a31Copy full SHA for 65c3a31
src/lib.rs
@@ -442,7 +442,7 @@ where
442
if let (Some(p), Some(host)) = (self.match_proxy(&uri), uri.host()) {
443
if uri.scheme() == Some(&http::uri::Scheme::HTTPS) || p.force_connect {
444
let host = host.to_owned();
445
- let port = uri.port_u16().unwrap_or(443);
+ let port = uri.port_u16().unwrap_or(if uri.scheme() == Some(&http::uri::Scheme::HTTP) { 80 } else { 443 });
446
let tunnel = tunnel::new(&host, port, &p.headers);
447
let connection =
448
proxy_dst(&uri, &p.uri).map(|proxy_url| self.connector.call(proxy_url));
0 commit comments