Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
guswynn committed May 3, 2022
1 parent 2e19b66 commit d12a07e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions tonic/Cargo.toml
Expand Up @@ -31,6 +31,7 @@ tls = ["rustls-pemfile", "transport", "tokio-rustls"]
tls-roots = ["tls-roots-common", "rustls-native-certs"]
tls-roots-common = ["tls"]
tls-webpki-roots = ["tls-roots-common", "webpki-roots"]
custom-tls = []
transport = [
"axum",
"channel"
Expand Down
3 changes: 2 additions & 1 deletion tonic/src/transport/service/connector.rs
Expand Up @@ -79,11 +79,12 @@ where
#[cfg(feature = "tls-roots-common")]
let tls = self.tls_or_default(uri.scheme_str(), uri.host());

#[cfg(any(not(feature = "custom-tls"), 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"))]
#[cfg(all(not(feature = "tls"), not(feature = "custom-tls")))]
{
if is_https {
return Err(HttpsUriWithoutTlsSupport(()).into());
Expand Down

0 comments on commit d12a07e

Please sign in to comment.