From 0b1c20ceccb526ea08284c653cab7352649252da Mon Sep 17 00:00:00 2001 From: Igor Novgorodov Date: Thu, 21 Nov 2024 07:56:10 +0100 Subject: [PATCH 1/2] upgrade http lib to use Bytes body --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/routing/ic/handler.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6bdc2a..947e995 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "ic-http-gateway" version = "0.0.0" -source = "git+https://github.com/dfinity/http-gateway?tag=0.1.0-b2#2c5366bfd9036712c5043de8c15528743004e37a" +source = "git+https://github.com/dfinity/http-gateway?tag=0.1.0-b3#192559e062cfa90d5dbb4df03198f66a80f31046" dependencies = [ "bytes", "candid", diff --git a/Cargo.toml b/Cargo.toml index 0e45e71..e59d3a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ ic-agent = { version = "0.39.1", features = [ "_internal_dynamic-routing", ] } ic-bn-lib = { git = "https://github.com/dfinity/ic-bn-lib", rev = "526d34d15cfbf369d8baf2dae9932aa18d570a1d" } -ic-http-gateway = { git = "https://github.com/dfinity/http-gateway", tag = "0.1.0-b2" } +ic-http-gateway = { git = "https://github.com/dfinity/http-gateway", tag = "0.1.0-b3" } itertools = "0.13.0" lazy_static = "1.5.0" maxminddb = "0.24.0" diff --git a/src/routing/ic/handler.rs b/src/routing/ic/handler.rs index 9aa31af..f36f74f 100644 --- a/src/routing/ic/handler.rs +++ b/src/routing/ic/handler.rs @@ -59,7 +59,7 @@ pub async fn handler( }; let args = HttpGatewayRequestArgs { - canister_request: CanisterRequest::from_parts(parts, body.to_vec()), + canister_request: CanisterRequest::from_parts(parts, body), canister_id, }; From f56e34c32805b45d2d3e7bdbf796102d536db7ee Mon Sep 17 00:00:00 2001 From: Igor Novgorodov Date: Thu, 21 Nov 2024 12:25:46 +0100 Subject: [PATCH 2/2] update deps --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 947e995..97e0653 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2572,7 +2572,7 @@ dependencies = [ "strum", "strum_macros", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.3", "tikv-jemalloc-ctl", "tikv-jemallocator", "time", diff --git a/Cargo.toml b/Cargo.toml index e59d3a6..4bb9a3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] ahash = "0.8.11" -anyhow = "1.0.92" +anyhow = "1.0.93" arc-swap = "1.7.1" async-channel = "2.3.1" async-trait = "0.1.83" @@ -75,7 +75,7 @@ serde_cbor = "0.11.2" serde_json = "1.0.132" strum = { version = "0.26.3", features = ["derive"] } strum_macros = "0.26.4" -thiserror = "1.0.68" +thiserror = "2.0.3" tikv-jemallocator = "0.6.0" tikv-jemalloc-ctl = { version = "0.6.0", features = ["stats"] } time = { version = "0.3.36", features = ["macros", "serde"] }