chore: upgrade hyper/tokio libraries

This commit is contained in:
Bruno Thomas 2022-02-03 23:25:12 +01:00 committed by Felipe Noronha
parent ff09ac01a1
commit f8cd92c507
3 changed files with 6 additions and 7 deletions

View File

@ -19,9 +19,9 @@ include = [
]
[dependencies]
hyper = "0.13"
hyper = { version = "0.14", features = ["full"] }
lazy_static = "1.4"
unicase = "2.6"
[dev-dependencies]
tokio = { version = "0.2", features = ["full"] }
tokio = { version = "0.3", features = ["full"] }

View File

@ -25,8 +25,8 @@ Add these dependencies to your `Cargo.toml` file.
```toml
[dependencies]
hyper-reverse-proxy = "0.5"
hyper = "0.13"
tokio = { version = "0.2", features = ["full"] }
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "0.3", features = ["full"] }
```
The following example will set up a reverse proxy listening on `127.0.0.1:13900`,

View File

@ -59,7 +59,7 @@
//! // will forward requests to port 13902
//! match hyper_reverse_proxy::call(client_ip, "http://127.0.0.1:13902", req).await {
//! Ok(response) => {Ok(response)}
//! Err(error) => {Ok(Response::builder()
//! Err(_error) => {Ok(Response::builder()
//! .status(StatusCode::INTERNAL_SERVER_ERROR)
//! .body(Body::empty())
//! .unwrap())}
@ -83,11 +83,10 @@
//!
//! let server = Server::bind(&addr).serve(make_svc);
//!
//! println!("Running server on {:?}", addr);
//! if let Err(e) = server.await {
//! eprintln!("server error: {}", e);
//! }
//!
//! println!("Running server on {:?}", addr);
//! }
//! ```
//!