From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: superseded: [PATCH proxmox] s3-client: copy_object: always set Content-Type header
Date: Mon, 16 Mar 2026 15:21:51 +0100 [thread overview]
Message-ID: <d33200b7-1c15-4541-9bce-e66703bdda60@proxmox.com> (raw)
In-Reply-To: <20260311095600.73538-1-h.laimer@proxmox.com>
superseded-by:
https://lore.proxmox.com/pbs-devel/20260316141940.3576-1-h.laimer@proxmox.com/T/#u
On 2026-03-11 10:56, Hannes Laimer wrote:
> Some S3 providers drop all source metadata, including Content-Type,
> when using x-amz-metadata-directive REPLACE unless it is explicitly
> provided in the copy request. This caused s3_refresh to fail with
> "missing header 'content-type'" on such providers when fetching
> objects moved via copy_object.
>
> Setting Content-Type explicitly is a no-op for providers that already
> preserve it, so this is safe regardless of the provider.
>
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> did notice this with RustFS, MinIO did not have that problem
>
> proxmox-s3-client/src/client.rs | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/proxmox-s3-client/src/client.rs b/proxmox-s3-client/src/client.rs
> index 81645716..baa8345e 100644
> --- a/proxmox-s3-client/src/client.rs
> +++ b/proxmox-s3-client/src/client.rs
> @@ -602,6 +602,7 @@ impl S3Client {
> .method(Method::PUT)
> .uri(self.build_uri(&destination_key, &[])?)
> .header("x-amz-copy-source", HeaderValue::from_str(©_source)?)
> + .header(header::CONTENT_TYPE, "binary/octet-stream")
> .header(
> "x-amz-metadata-directive",
> HeaderValue::from_str("REPLACE")?,
prev parent reply other threads:[~2026-03-16 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 9:56 Hannes Laimer
2026-03-12 12:39 ` Christian Ebner
2026-03-12 12:45 ` Hannes Laimer
2026-03-12 12:48 ` Christian Ebner
2026-03-16 14:21 ` Hannes Laimer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d33200b7-1c15-4541-9bce-e66703bdda60@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox