mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
CopyObject and UploadPartCopy decoded the entire x-amz-copy-source header before splitting bucket, key, and query. A key containing a literal '?' (sent as %3F or raw) was then truncated at the first '?', so the copy resolved the wrong key and returned NoSuchKey. Split bucket/key/query on the raw header and decode each component separately. A trailing '?...' is only treated as a query string when it contains versionId=; otherwise the '?' is kept as part of the key. The same parsing is used by both CopyObject and UploadPartCopy. Adds a regression test covering encoded (%3F) and raw '?' copy sources. Closes #1713