From 4de84dfe38cc30030ce40d83c5d174d6a268a191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 21 Jan 2025 12:30:04 +0100 Subject: [PATCH] feat(sdk): Enable HTTP/2 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It became an optional default feature in reqwest 0.12, and we disable the default features, so I don't think it was meant to be disabled when the crate was upgraded. Signed-off-by: Kévin Commaille --- Cargo.lock | 1 + crates/matrix-sdk/CHANGELOG.md | 3 +++ crates/matrix-sdk/Cargo.toml | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9ba9b1e81bd..5e947ce90fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4651,6 +4651,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", + "h2", "http", "http-body", "http-body-util", diff --git a/crates/matrix-sdk/CHANGELOG.md b/crates/matrix-sdk/CHANGELOG.md index 6e880865601..84257ac97e4 100644 --- a/crates/matrix-sdk/CHANGELOG.md +++ b/crates/matrix-sdk/CHANGELOG.md @@ -23,6 +23,9 @@ All notable changes to this project will be documented in this file. related to room access and visibility. ([#4401](https://github.com/matrix-org/matrix-rust-sdk/pull/4401)) +- Enable HTTP/2 support in the HTTP client. + ([#4566](https://github.com/matrix-org/matrix-rust-sdk/pull/4566)) + ### Refactor - [**breaking**] Move the optional `RequestConfig` argument of the diff --git a/crates/matrix-sdk/Cargo.toml b/crates/matrix-sdk/Cargo.toml index a62365f63d1..683f4582169 100644 --- a/crates/matrix-sdk/Cargo.toml +++ b/crates/matrix-sdk/Cargo.toml @@ -124,7 +124,7 @@ zeroize = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] gloo-timers = { workspace = true, features = ["futures"] } -reqwest = { workspace = true, features = ["gzip"] } +reqwest = { workspace = true, features = ["gzip", "http2"] } tokio = { workspace = true, features = ["macros"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] @@ -132,7 +132,7 @@ backoff = { version = "0.4.0", features = ["tokio"] } openidconnect = { version = "4.0.0-rc.1", optional = true } # only activate reqwest's stream feature on non-wasm, the wasm part seems to not # support *sending* streams, which makes it useless for us. -reqwest = { workspace = true, features = ["stream", "gzip"] } +reqwest = { workspace = true, features = ["stream", "gzip", "http2"] } tokio = { workspace = true, features = ["fs", "rt", "macros"] } tokio-util = "0.7.12" wiremock = { workspace = true, optional = true }