Files
floci/docs
Tomas KislanandPriamo Germosen 55c33d7ad3 fix(s3): keep Content-Encoding and Cache-Control on multipart uploads (#7000)
* fix(s3): keep Content-Encoding and Cache-Control on multipart uploads

CreateMultipartUpload ignored both headers, so an object completed from a
multipart upload came back from HeadObject and GetObject without them while a
single PutObject kept them. A client that decodes by Content-Encoding (a
browser, curl --compressed) then received raw gzip bytes for any object large
enough to be uploaded in parts.

The controller now reads both headers on the ?uploads branch, stripping the
aws-chunked token as PutObject does. S3Service records them on the
MultipartUpload and applies them to the object when the upload completes.
An upload created without either header still produces an object with neither.

* test(s3): use .bin keys and text/plain in the multipart encoding tests

Match the neighbouring tests, which name objects *.bin; the behaviour under
test is not specific to YAML. The content type is text/plain rather than
application/octet-stream because MultipartUpload falls back to
application/octet-stream when CreateMultipartUpload carries no Content-Type,
so asserting that value could not catch a dropped header.

---------

Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-10-30 08:52:53 -04:00
..
2026-03-15 17:43:56 -05:00