Content-Encoding is a comma-separated list of content-coding tokens with
optional surrounding whitespace, and token names are case-insensitive
per RFC 9110 Section 8.4.
Previously, trimAwsChunkedContentEncoding split on commas and compared
each raw segment against "aws-chunked" with exact string equality. Inputs
such as "gzip, aws-chunked" or "AWS-Chunked" retained the transport
coding in stored object metadata, and "aws-chunked, gzip" left a leading
space in the persisted encoding.
Trim surrounding whitespace on each comma-separated coding token and
match "aws-chunked" with strings.EqualFold. Update the corresponding
whitespace cases in TestExtractReplicationMetadataPreservesNormalizedMetadata
and add unit tests in TestTrimAwsChunkedContentEncoding.
Signed-off-by: lingyicute <xlyxinglinyi@gmail.com>
Restore only the six replication-specific metadata fields after trust
validation, so streaming uploads retain their actual content encoding and
Snowball entries do not inherit ordinary metadata from the outer archive.
Include helper, authenticated PUT/COPY/multipart and Snowball regressions,
plus the R7 investigation, actual Opus 5 consensus and local verification.
The production change is based on PR #187 by Mikhail Khadarenka.
Co-authored-by: Mikhail Khadarenka <chodorenko@gmail.com>
Signed-off-by: Feng Ruohang <rh@vonng.com>