wip: h3-0.0.8
This commit is contained in:
parent
67e78041b4
commit
9e743b0dca
4 changed files with 36 additions and 14 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
|
@ -1000,6 +1000,20 @@ name = "h3"
|
||||||
version = "0.0.7"
|
version = "0.0.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3"
|
checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"fastrand",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "h3"
|
||||||
|
version = "0.0.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "10872b55cfb02a821b69dc7cf8dc6a71d6af25eb9a79662bec4a9d016056b3be"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
|
|
@ -1012,13 +1026,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "h3-quinn"
|
name = "h3-quinn"
|
||||||
version = "0.0.9"
|
version = "0.0.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6d482318ae94198fc8e3cbb0b7ba3099c865d744e6ec7c62039ca7b6b6c66fbf"
|
checksum = "8b2e732c8d91a74731663ac8479ab505042fbf547b9a207213ab7fbcbfc4f8b4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures",
|
"futures",
|
||||||
"h3",
|
"h3 0.0.8",
|
||||||
"quinn",
|
"quinn",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
|
|
@ -2159,7 +2173,7 @@ dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"h3",
|
"h3 0.0.8",
|
||||||
"h3-quinn",
|
"h3-quinn",
|
||||||
"hot_reload",
|
"hot_reload",
|
||||||
"http",
|
"http",
|
||||||
|
|
@ -2443,7 +2457,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures",
|
"futures",
|
||||||
"h3",
|
"h3 0.0.7",
|
||||||
"s2n-quic",
|
"s2n-quic",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,8 @@ tracing = { version = "0.1.41" }
|
||||||
|
|
||||||
# http/3
|
# http/3
|
||||||
quinn = { version = "0.11.7", optional = true }
|
quinn = { version = "0.11.7", optional = true }
|
||||||
h3 = { version = "0.0.7", features = ["tracing"], optional = true }
|
h3 = { version = "0.0.8", features = ["tracing"], optional = true }
|
||||||
h3-quinn = { version = "0.0.9", optional = true }
|
h3-quinn = { version = "0.0.10", optional = true }
|
||||||
s2n-quic = { version = "1.57.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [
|
s2n-quic = { version = "1.57.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [
|
||||||
"provider-tls-rustls",
|
"provider-tls-rustls",
|
||||||
], optional = true }
|
], optional = true }
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,11 @@ pub enum RpxyError {
|
||||||
|
|
||||||
// http/3 errors
|
// http/3 errors
|
||||||
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
||||||
#[error("H3 error: {0}")]
|
#[error("h3 connection error: {0}")]
|
||||||
H3Error(#[from] h3::Error),
|
H3ConnectionError(#[from] h3::error::ConnectionError),
|
||||||
|
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
||||||
|
#[error("h3 connection error: {0}")]
|
||||||
|
H3StreamError(#[from] h3::error::StreamError),
|
||||||
// #[cfg(feature = "http3-s2n")]
|
// #[cfg(feature = "http3-s2n")]
|
||||||
// #[error("H3 error: {0}")]
|
// #[error("H3 error: {0}")]
|
||||||
// H3Error(#[from] s2n_quic_h3::h3::Error),
|
// H3Error(#[from] s2n_quic_h3::h3::Error),
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,17 @@ where
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
warn!("HTTP/3 error on accept incoming connection: {}", e);
|
warn!("HTTP/3 error on accept incoming connection: {}", e);
|
||||||
match e.get_error_level() {
|
break;
|
||||||
h3::error::ErrorLevel::ConnectionError => break,
|
|
||||||
h3::error::ErrorLevel::StreamError => continue,
|
|
||||||
}
|
}
|
||||||
|
// Ok(Some((req, stream))) => {
|
||||||
|
Ok(Some(req_resolver)) => {
|
||||||
|
let (req, stream) = match req_resolver.resolve_request().await {
|
||||||
|
Ok((req, stream)) => (req, stream),
|
||||||
|
Err(e) => {
|
||||||
|
warn!("HTTP/3 error on resolve request in stream: {}", e);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
Ok(Some((req, stream))) => {
|
};
|
||||||
// We consider the connection count separately from the stream count.
|
// We consider the connection count separately from the stream count.
|
||||||
// Max clients for h1/h2 = max 'stream' for h3.
|
// Max clients for h1/h2 = max 'stream' for h3.
|
||||||
let request_count = self.globals.request_count.clone();
|
let request_count = self.globals.request_count.clone();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue