forked from Proxmox/proxmox
http: support ALPN negotiated http2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
d73eb3dcf1
commit
9be9d4b6ab
@ -87,7 +87,14 @@ impl<S: Connection + AsyncRead + AsyncWrite + Unpin> Connection for MaybeTlsStre
|
||||
match self {
|
||||
MaybeTlsStream::Normal(s) => s.connected(),
|
||||
MaybeTlsStream::Proxied(s) => s.connected().proxy(true),
|
||||
MaybeTlsStream::Secured(s) => s.get_ref().connected(),
|
||||
MaybeTlsStream::Secured(s) => {
|
||||
let connected = s.get_ref().connected();
|
||||
if s.ssl().selected_alpn_protocol() == Some(b"h2") {
|
||||
connected.negotiated_h2()
|
||||
} else {
|
||||
connected
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user