mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 06:47:41 -05:00
The object PUT endpoint took its body as a byte array, so a single PutObject or UploadPart was held whole in the heap and capped near 2 GiB. The body is now read as a stream. A streaming aws-chunked payload is decoded as it arrives, and Content-MD5 and x-amz-checksum-* are checked on the way through. In the disk-backed modes the body is staged under .multipart/.incoming with no lock held, then a part is moved into its upload under the upload's lock and an object is stored like an assembled multipart object. Checks the request alone decides (bucket, SSE-C headers, checksum algorithm, write preconditions, a malformed Content-MD5) run before any of the body is read. Memory mode reads the body into a capped array and fails past about 2 GiB with EntityTooLarge.