Skip to content
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();
Copy link
Member

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