Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force_correct incorrectly assumes port 443 #25

Open
shutton opened this issue Aug 6, 2021 · 0 comments
Open

force_correct incorrectly assumes port 443 #25

shutton opened this issue Aug 6, 2021 · 0 comments

Comments

@shutton
Copy link

shutton commented Aug 6, 2021

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant