force_correct incorrectly assumes port 443
shutton opened this issue · 0 comments
shutton commented
If a provided URL is http
rather than https
, this bit of code will accidentally set the outgoing port to 443 without checking the scheme if force_connect
is enabled
if uri.scheme() == Some(&httpur::i::Scheme::HTTPS) || p.force_connect {
let host = host.to_owned();
let port = uri.port_u16().unwrap_or(443);