diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-12-27 17:59:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 11:59:57 -0500 |
commit | c2414db1f68d27db8ca6f192f0ff877f1394164c (patch) | |
tree | 528da9796f400557204bfdb8e4d44d64173036ce /ext/node | |
parent | 33acd437f52b418a8413a302dd8902abad2eabec (diff) |
refactor: simplify hyper, http, h2 deps (#21715)
Main change is that:
- "hyper" has been renamed to "hyper_v014" to signal that it's legacy
- "hyper1" has been renamed to "hyper" and should be the default
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/Cargo.toml | 4 | ||||
-rw-r--r-- | ext/node/ops/http2.rs | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index b349fdbcd..a92766d94 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -32,10 +32,10 @@ dsa = "0.6.1" ecb.workspace = true elliptic-curve.workspace = true errno = "0.2.8" -h2.workspace = true +h2 = { version = "0.3.17", features = ["unstable"] } hex.workspace = true hkdf.workspace = true -http.workspace = true +http_v02.workspace = true idna = "0.3.0" indexmap.workspace = true k256 = "0.13.1" diff --git a/ext/node/ops/http2.rs b/ext/node/ops/http2.rs index 353a42e8b..bf295d542 100644 --- a/ext/node/ops/http2.rs +++ b/ext/node/ops/http2.rs @@ -25,11 +25,11 @@ use deno_net::raw::take_network_stream_resource; use deno_net::raw::NetworkStream; use h2; use h2::RecvStream; -use http; -use http::request::Parts; -use http::HeaderMap; -use http::Response; -use http::StatusCode; +use http_v02; +use http_v02::request::Parts; +use http_v02::HeaderMap; +use http_v02::Response; +use http_v02::StatusCode; use reqwest::header::HeaderName; use reqwest::header::HeaderValue; use url::Url; @@ -310,7 +310,7 @@ pub async fn op_http2_client_request( let url = url.join(&pseudo_path)?; - let mut req = http::Request::builder() + let mut req = http_v02::Request::builder() .uri(url.as_str()) .method(pseudo_method.as_str()); @@ -398,7 +398,7 @@ pub async fn op_http2_client_send_trailers( .get::<Http2ClientStream>(stream_rid)?; let mut stream = RcRef::map(&resource, |r| &r.stream).borrow_mut().await; - let mut trailers_map = http::HeaderMap::new(); + let mut trailers_map = http_v02::HeaderMap::new(); for (name, value) in trailers { trailers_map.insert( HeaderName::from_bytes(&name).unwrap(), |