From 39e4d626d29f06d7085b032a8148dd187f77b8a4 Mon Sep 17 00:00:00 2001 From: Jorge Hermo Date: Sat, 2 Nov 2024 10:59:10 +0100 Subject: [PATCH] test: fix broken tests --- core/src/services/azblob/backend.rs | 1 + core/src/services/azblob/core.rs | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/services/azblob/backend.rs b/core/src/services/azblob/backend.rs index 8da8f936ee35..af8d0fc9ecec 100644 --- a/core/src/services/azblob/backend.rs +++ b/core/src/services/azblob/backend.rs @@ -549,6 +549,7 @@ impl Access for AzblobBackend { match status { StatusCode::OK => { let headers = resp.headers(); + dbg!(&headers); let mut meta = parse_into_metadata(path, headers)?; // TODO: Refactor in common with s3 metadata parsing // do the same as in parse_into_metadata... but for user metadata diff --git a/core/src/services/azblob/core.rs b/core/src/services/azblob/core.rs index 989aa04fcaee..55f415bfe07e 100644 --- a/core/src/services/azblob/core.rs +++ b/core/src/services/azblob/core.rs @@ -236,17 +236,13 @@ impl AzblobCore { ) -> Result> { let p = build_abs_path(&self.root, path); - let mut url = format!( + let url = format!( "{}/{}/{}", self.endpoint, self.container, percent_encode_path(&p) ); - if let Some(_) = args.user_metadata() { - url.push_str("?comp=metadata"); - } - let mut req = Request::put(&url); // Set user metadata headers. @@ -264,6 +260,7 @@ impl AzblobCore { if let Some(cache_control) = args.cache_control() { req = req.header(constants::X_MS_BLOB_CACHE_CONTROL, cache_control); } + if let Some(size) = size { req = req.header(CONTENT_LENGTH, size) } @@ -495,7 +492,7 @@ impl AzblobCore { let p = build_abs_path(&self.root, path); let url = format!( - "{}/{}/{}?comp=metadata", + "{}/{}/{}", self.endpoint, self.container, percent_encode_path(&p)