[pbs-devel] [PATCH proxmox 2/2] s3 client: skip setting `If-None-Match` header for Backblaze B2

Christian Ebner c.ebner at proxmox.com
Mon Jul 28 12:01:52 CEST 2025


Backblaze B2 does not allow to set the `If-None-Match` http header
for put requests, failing with an error instead of implementing or
ignoring it. Skip setting the header (and therefore re-uploading
the object) if the quirk configuration is set to backblaze.

Reported-by: https://forum.proxmox.com/threads/168834/post-786278
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 proxmox-s3-client/src/client.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/proxmox-s3-client/src/client.rs b/proxmox-s3-client/src/client.rs
index bbe363da..bd7aff18 100644
--- a/proxmox-s3-client/src/client.rs
+++ b/proxmox-s3-client/src/client.rs
@@ -396,7 +396,12 @@ impl S3Client {
             .header(header::CONTENT_TYPE, "binary/octet");
 
         if !replace {
-            request = request.header(header::IF_NONE_MATCH, "*");
+            // Backblaze B2 does not implement this and fails with error if the header is set,
+            // see https://forum.proxmox.com/threads/168834/post-786278
+            match self.options.quirks.as_deref() {
+                Some("backblaze") => (),
+                _ => request = request.header(header::IF_NONE_MATCH, "*"),
+            }
         }
 
         let request = request.body(object_data)?;
-- 
2.47.2





More information about the pbs-devel mailing list