From 8e6d6ccc21317754b23945e4b9ba03746060bde6 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 22 Apr 2024 14:07:00 +0200 Subject: [PATCH] storage: Use old `http` crate for HTTP header imports The `object_store` crate unfortunately does not re-export the `http` types that we need for the `with_default_headers()` calls and it is (via `reqwest`) still relying on the v0.2 version of the `http` crate. Since this blocks us from upgrading the `reqwest` dependency ourselves we'll explicitly add the dependency for now until `object_store` is updated to the most recent version of `reqwest` and `http`. --- Cargo.lock | 1 + Cargo.toml | 1 + src/storage.rs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f31e58cede8..9b2cd3bd379 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -970,6 +970,7 @@ dependencies = [ "github-meta", "googletest", "hex", + "http 0.2.12", "http 1.1.0", "http-body-util", "hyper 1.3.1", diff --git a/Cargo.toml b/Cargo.toml index 48e531cdadb..2d1a112e1f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,6 +92,7 @@ minijinja = "=1.0.20" mockall = "=0.12.1" oauth2 = { version = "=4.4.2", default-features = false, features = ["reqwest"] } object_store = { version = "=0.9.1", features = ["aws"] } +object_store_http = { package = "http", version = "=0.2.12" } once_cell = "=1.19.0" p256 = "=0.13.2" parking_lot = "=0.12.1" diff --git a/src/storage.rs b/src/storage.rs index 983fecbe704..75c5de0d286 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -8,8 +8,8 @@ use object_store::memory::InMemory; use object_store::path::Path; use object_store::prefix::PrefixStore; use object_store::{ClientOptions, ObjectStore, Result}; -use reqwest::header::CACHE_CONTROL; -use reqwest::header::{HeaderMap, HeaderValue}; +use object_store_http::header::CACHE_CONTROL; +use object_store_http::header::{HeaderMap, HeaderValue}; use secrecy::{ExposeSecret, SecretString}; use std::fs; use std::path::PathBuf;