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

fix(bug #3785): adresses ssl wrong version error when pointing to rest https end… #5

Open
wants to merge 1 commit into
base: rust_mayastor
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ impl Configuration {
let client = {
match certificate {
None => {
let mut http = hyper_tls::HttpsConnector::new();
let mut http = hyper::client::HttpConnector::new();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't looked at this connections for a while so pardon my lack of understanding here, but what is the difference here, using the HttpConnector?

if url.scheme() == "https" {
http.https_only(true);
http.enforce_http(false);
}

let tls = hyper_tls::native_tls::TlsConnector::builder()
Expand All @@ -362,8 +362,8 @@ impl Configuration {
.map_err(|_| Error::TlsConnector)?;
let tls = tokio_native_tls::TlsConnector::from(tls);

let mut http = hyper_tls::HttpsConnector::new();
http.https_only(true);
let mut http = hyper::client::HttpConnector::new();
http.enforce_http(false);
let connector = hyper_tls::HttpsConnector::from((http, tls));
url.set_scheme("https").ok();
hyper::Client::builder().build(connector)
Expand Down