From ff5a84df3941207ab5f6af2d051c843bce5b08d8 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:47:24 +0000 Subject: [PATCH] Pass options to HTTPBuilder in parse_url_opts (#5310) (#5311) --- object_store/src/parse.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/object_store/src/parse.rs b/object_store/src/parse.rs index ddea034699f0..47e537cc9f72 100644 --- a/object_store/src/parse.rs +++ b/object_store/src/parse.rs @@ -105,7 +105,7 @@ impl ObjectStoreScheme { } } -#[cfg(any(feature = "aws", feature = "gcp", feature = "azure"))] +#[cfg(feature = "cloud")] macro_rules! builder_opts { ($builder:ty, $url:expr, $options:expr) => {{ let builder = $options.into_iter().fold( @@ -164,8 +164,7 @@ where } #[cfg(feature = "http")] ObjectStoreScheme::Http => { - let url = &url[..url::Position::BeforePath]; - Box::new(crate::http::HttpBuilder::new().with_url(url).build()?) as _ + builder_opts!(crate::http::HttpBuilder, url, _options) } #[cfg(not(all(feature = "aws", feature = "azure", feature = "gcp", feature = "http")))] s => {