Skip to content

Commit 65c3a31

Browse files
authored
Merge pull request #27 from Yerkwell/default-http-port
Set 80 as default port for http
2 parents b392b52 + 7c72bc3 commit 65c3a31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ where
442442
if let (Some(p), Some(host)) = (self.match_proxy(&uri), uri.host()) {
443443
if uri.scheme() == Some(&http::uri::Scheme::HTTPS) || p.force_connect {
444444
let host = host.to_owned();
445-
let port = uri.port_u16().unwrap_or(443);
445+
let port = uri.port_u16().unwrap_or(if uri.scheme() == Some(&http::uri::Scheme::HTTP) { 80 } else { 443 });
446446
let tunnel = tunnel::new(&host, port, &p.headers);
447447
let connection =
448448
proxy_dst(&uri, &p.uri).map(|proxy_url| self.connector.call(proxy_url));

0 commit comments

Comments
 (0)