Add support for wss: scheme in hyper-boring
This commit is contained in:
parent
f8ab082d59
commit
2fc44386af
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "hyper-boring"
|
name = "hyper-boring"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
authors = ["Steven Fackler <sfackler@gmail.com>", "Ivan Nikulin <ifaaan@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Hyper TLS support via BoringSSL"
|
description = "Hyper TLS support via BoringSSL"
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,12 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
fn call(&mut self, uri: Uri) -> Self::Future {
|
fn call(&mut self, uri: Uri) -> Self::Future {
|
||||||
let tls_setup = if uri.scheme() == Some(&Scheme::HTTPS) {
|
let is_tls_scheme = uri
|
||||||
|
.scheme()
|
||||||
|
.map(|s| s == &Scheme::HTTPS || s.as_str() == "wss")
|
||||||
|
.unwrap_or(false);
|
||||||
|
|
||||||
|
let tls_setup = if is_tls_scheme {
|
||||||
Some((self.inner.clone(), uri.clone()))
|
Some((self.inner.clone(), uri.clone()))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue