mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-01 00:51:26 +00:00
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 {
|
match self {
|
||||||
MaybeTlsStream::Normal(s) => s.connected(),
|
MaybeTlsStream::Normal(s) => s.connected(),
|
||||||
MaybeTlsStream::Proxied(s) => s.connected().proxy(true),
|
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