mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-28 09:08:58 +00:00
4f3f2afd0d
refactor(ecstore): make client base64 standard everywhere, drop the split Self-review of the transition-client fixes: the Content-MD5 fix had only converted the two transition call sites to a parallel base64_encode_standard, leaving the same URL-safe, unpadded base64 bug on every other outbound value — the SigV2/no-length multipart Content-MD5, the x-amz-checksum-* headers on the parallel and no-length paths, api_remove's multi-delete Content-MD5, and the checksum encode/decode helpers. Every base64 value this client emits or parses is S3 wire format, which is standard base64; none is ever URL-safe. Encode and decode both use base64_simd::STANDARD now, and the parallel base64_encode_standard is gone. This fixes those seven latent call sites at the root and removes the duplicate function. The transition path is functionally unchanged (it already produced standard base64 via the helper), so the end-to-end byte-for-byte result is preserved. Also drop a stray Vec::with_capacity(part_size) that was allocated (up to 128 MiB) and immediately overwritten by read_multipart_part's own buffer. Refs: rustfs/rustfs#4811, rustfs/backlog#1267 Co-authored-by: heihutu <heihutu@gmail.com>