Skip to content

Commit

Permalink
Updated root Cargo.toml to latest hyper and http
Browse files Browse the repository at this point in the history
- Broken build. Still more to go.
  • Loading branch information
tkmcmaster committed Jul 22, 2024
1 parent 6829949 commit e65429d
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 97 deletions.
146 changes: 80 additions & 66 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ for_each_parallel = { path = "./lib/for_each_parallel" }
futures = "0.3"
futures-timer = "3"
hdrhistogram = "7"
http = "0.2"
hyper = { version = "0.14", features = ["client", "http1", "http2", "stream"] }
hyper-tls = "0.5"
http = "1.1"
hyper = { version = "1.0", features = ["client", "http1", "http2"] }
hyper-tls = "0.6"
hyper-util = { version = "0.1", features = ["tokio", "client", "http1", "http2"] }
http-body-util = "0.1"
itertools = "0.13"
mod_interval = { path = "./lib/mod_interval" }
native-tls = "0.2"
Expand All @@ -47,6 +49,7 @@ serde_json = "1"
test_common = { path = "./lib/test_common" }
tokio = "1"
tokio-stream = { version = "0.1", features = ["sync", "time"] }
tokio-util = "0.7"
url = "2"
yansi = "1"
zip_all = { path = "./lib/zip_all" }
Expand Down
2 changes: 1 addition & 1 deletion lib/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ doctest = false
base64 = "0.22"
ether = { path = "../either" }
futures = "0.3"
http = "0.2"
http = "1.1"
itertools = "0.13"
jsonpath_lib = "0.3.0"
percent-encoding = "2"
Expand Down
4 changes: 2 additions & 2 deletions lib/test_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ path = "test_common.rs"
bytes = "1"
futures = "0.3"
futures-timer = "3"
hyper = { version = "1.4", features = ["http1"] }
hyper-util = { version = "0.1", features = ["tokio", "server", "http1"] }
hyper = { version = "1.4", features = ["http1", "http2"] }
hyper-util = { version = "0.1", features = ["tokio", "server", "http1", "http2"] }
http = "1.1"
http-body-util = "0.1"
parking_lot = "0.12"
Expand Down
18 changes: 12 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ use futures::{
stream, FutureExt, Stream, StreamExt,
};
use futures_timer::Delay;
use hyper::{client::HttpConnector, Body, Client};
use hyper::body::Incoming as Body;
use hyper_tls::HttpsConnector;
use hyper_util::{
client::legacy::{
connect::{dns::GaiResolver, HttpConnector},
Client,
},
rt::TokioExecutor,
};
use itertools::Itertools;
use line_writer::{blocking_writer, MsgType};
use log::{debug, error, info, warn};
Expand Down Expand Up @@ -1139,16 +1146,15 @@ fn create_load_test_future(

pub(crate) fn create_http_client(
keepalive: Duration,
) -> Result<
Client<HttpsConnector<HttpConnector<hyper::client::connect::dns::GaiResolver>>>,
TestError,
> {
) -> Result<Client<HttpsConnector<HttpConnector<GaiResolver>>, Body>, TestError> {
let mut http = HttpConnector::new();
http.set_keepalive(Some(keepalive));
http.set_reuse_address(true);
http.enforce_http(false);
let https = HttpsConnector::from((http, TlsConnector::new()?.into()));
Ok(Client::builder().set_host(false).build::<_, Body>(https))
Ok(Client::builder(TokioExecutor::new())
.set_host(false)
.build::<_, Body>(https))
}

type ProvidersResult = Result<(BTreeMap<String, providers::Provider>, BTreeSet<String>), TestError>;
Expand Down
Loading

0 comments on commit e65429d

Please sign in to comment.