fix(transport): Emit HttpsUriWithoutTlsSupport only w/ tls feat (#996)

This commit is contained in:
Gus Wynn
2022-05-04 10:26:34 -07:00
committed by GitHub
parent 2e19b660e5
commit 1dd5ad2b07
+1 -7
View File
@@ -79,17 +79,11 @@ where
#[cfg(feature = "tls-roots-common")]
let tls = self.tls_or_default(uri.scheme_str(), uri.host());
#[cfg(feature = "tls")]
let is_https = uri.scheme_str() == Some("https");
let connect = self.inner.make_connection(uri);
Box::pin(async move {
#[cfg(not(feature = "tls"))]
{
if is_https {
return Err(HttpsUriWithoutTlsSupport(()).into());
}
}
let io = connect.await?;
#[cfg(feature = "tls")]