Skip to content

Commit

Permalink
update node apis future and hyper
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Hahn authored and who-biz committed Oct 25, 2023
1 parent d135732 commit d899850
Show file tree
Hide file tree
Showing 37 changed files with 1,315 additions and 1,080 deletions.
544 changes: 332 additions & 212 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -39,6 +39,7 @@ ctrlc = { version = "3.1", features = ["termination"] }
cursive_table_view = "0.13.2"
humansize = "1.1.0"
serde = "1"
futures = "0.3.19"
serde_json = "1"
log = "0.4"
term = "0.5"
Expand Down
34 changes: 18 additions & 16 deletions api/Cargo.toml
Expand Up @@ -10,32 +10,34 @@ workspace = ".."
edition = "2018"

[dependencies]
easy-jsonrpc-mw = "0.5.3"
failure = "0.1.1"
failure_derive = "0.1.1"
hyper = "0.12"
easy-jsonrpc-mw = "0.5.4"

hyper = { version = "0.13"}
lazy_static = "1"
regex = "1"

ring = "^0.16.20"
serde = "1"
serde_derive = "1"
serde_json = "1"
thiserror = "1"
log = "0.4"
tokio = "0.1"
tokio-core = "0.1.17"
tokio-tcp = "0.1"
tokio = { version = "0.2", features = ["full"] }
tokio-rustls = "0.13"

http = "0.1.5"
hyper-timeout = "0.2"
futures = "0.1.21"
http = "0.2"
hyper-timeout = "0.3"
futures = "0.3"

url = "1.7.0"
url = "2.1"
bigint = "4.4.1"

ring = "^0.16.20"
hyper-rustls = "0.17.1"
rustls = "0.16.0"
tokio-rustls = "^0.10"

hyper-rustls = "0.20"
rustls = "0.17"

bytes = "0.5"



epic_core = { path = "../core", version = "3.4.0" }
epic_chain = { path = "../chain", version = "3.4.0" }
Expand Down
5 changes: 3 additions & 2 deletions api/src/auth.rs
Expand Up @@ -14,6 +14,7 @@

use crate::router::{Handler, HandlerObj, ResponseFuture};
use crate::web::response;

use futures::future::ok;
use hyper::header::{HeaderValue, AUTHORIZATION, WWW_AUTHENTICATE};
use hyper::{Body, Request, Response, StatusCode};
Expand Down Expand Up @@ -128,7 +129,7 @@ impl Handler for BasicAuthURIMiddleware {
unauthorized_response(&self.basic_realm)
}
} else {
return next_handler.call(req, handlers);
next_handler.call(req, handlers)
}
}
}
Expand All @@ -139,5 +140,5 @@ fn unauthorized_response(basic_realm: &HeaderValue) -> ResponseFuture {
.header(WWW_AUTHENTICATE, basic_realm)
.body(Body::empty())
.unwrap();
Box::new(ok(response))
Box::pin(ok(response))
}

0 comments on commit d899850

Please sign in to comment.