From f3eb41b2a06a610928e241fb094dee05abd2e9e9 Mon Sep 17 00:00:00 2001 From: 3cL1p5e7 <3cL1p5e7@gmail.com> Date: Mon, 28 Feb 2022 00:12:16 +0300 Subject: [PATCH 1/3] ic-utils: added chunk_tree to StreamingCallbackHttpResponse --- ic-utils/src/interfaces/http_request.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ic-utils/src/interfaces/http_request.rs b/ic-utils/src/interfaces/http_request.rs index a940fa2c..855d39a8 100644 --- a/ic-utils/src/interfaces/http_request.rs +++ b/ic-utils/src/interfaces/http_request.rs @@ -55,6 +55,7 @@ pub struct StreamingCallbackHttpResponse { #[serde(with = "serde_bytes")] pub body: Vec, pub token: Option, + pub chunk_tree: Option, } impl HttpRequestCanister { From 64ee9e199b9e21c4965893d3b50e40d607e2d0a8 Mon Sep 17 00:00:00 2001 From: 3cL1p5e7 <3cL1p5e7@gmail.com> Date: Mon, 28 Feb 2022 01:01:20 +0300 Subject: [PATCH 2/3] ic-utils: make token index public --- ic-utils/src/interfaces/http_request.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ic-utils/src/interfaces/http_request.rs b/ic-utils/src/interfaces/http_request.rs index 855d39a8..36beaea9 100644 --- a/ic-utils/src/interfaces/http_request.rs +++ b/ic-utils/src/interfaces/http_request.rs @@ -23,7 +23,7 @@ pub struct HttpRequest<'body> { pub struct Token { key: String, content_encoding: String, - index: Nat, + pub index: Nat, // The sha ensures that a client doesn't stream part of one version of an asset // followed by part of a different asset, even if not checking the certificate. sha256: Option, From f5548b785ed3722a0dbf01781882fef02bc520fb Mon Sep 17 00:00:00 2001 From: 3cL1p5e7 <3cL1p5e7@gmail.com> Date: Fri, 11 Mar 2022 17:05:00 +0300 Subject: [PATCH 3/3] ic-utils: make chunk_tree Vec --- ic-utils/src/interfaces/http_request.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ic-utils/src/interfaces/http_request.rs b/ic-utils/src/interfaces/http_request.rs index 9d9de0d6..cdf04d84 100644 --- a/ic-utils/src/interfaces/http_request.rs +++ b/ic-utils/src/interfaces/http_request.rs @@ -76,7 +76,7 @@ pub struct StreamingCallbackHttpResponse { /// The new stream continuation token. pub token: Option, /// chunk witness tree. - pub chunk_tree: Option, + pub chunk_tree: Option>, } /// A token for continuing a callback streaming strategy.