[pbs-devel] [PATCH proxmox 02/17] http: rate-limited-stream: update to hyper/http 1.0
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Mar 26 16:23:06 CET 2025
using the legacy client from hyper_util, which is the replacement for
the pre 1.0 Client from hyper itself
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
proxmox-http/Cargo.toml | 7 +++++--
proxmox-http/src/rate_limited_stream.rs | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/proxmox-http/Cargo.toml b/proxmox-http/Cargo.toml
index 5edf304d..c5137e2a 100644
--- a/proxmox-http/Cargo.toml
+++ b/proxmox-http/Cargo.toml
@@ -17,6 +17,7 @@ base64 = { workspace = true, optional = true }
futures = { workspace = true, optional = true }
http = { workspace = true, optional = true }
hyper = { workspace = true, optional = true }
+hyper-util = { workspace = true, optional = true }
native-tls = { workspace = true, optional = true }
openssl = { version = "0.10", optional = true }
serde_json = { workspace = true, optional = true }
@@ -40,9 +41,11 @@ default = []
rate-limiter = ["dep:hyper"]
rate-limited-stream = [
- "dep:hyper",
"dep:tokio",
- "hyper?/client",
+ "dep:hyper-util",
+ "hyper-util?/client",
+ "hyper-util?/client-legacy",
+ "hyper-util?/http1",
"tokio?/time",
"rate-limiter",
]
diff --git a/proxmox-http/src/rate_limited_stream.rs b/proxmox-http/src/rate_limited_stream.rs
index d43c09c1..e9308a47 100644
--- a/proxmox-http/src/rate_limited_stream.rs
+++ b/proxmox-http/src/rate_limited_stream.rs
@@ -5,7 +5,7 @@ use std::pin::Pin;
use std::sync::{Arc, Mutex};
use std::time::{Duration, Instant};
-use hyper::client::connect::{Connected, Connection};
+use hyper_util::client::legacy::connect::{Connected, Connection};
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
use tokio::time::Sleep;
--
2.39.5
More information about the pbs-devel
mailing list