mirror of
https://github.com/versity/versitygw.git
synced 2026-01-04 11:03:57 +00:00
Closes #821 **Implements conditional operations across object APIs:** * **PutObject** and **CompleteMultipartUpload**: Supports conditional writes with `If-Match` and `If-None-Match` headers (ETag comparisons). Evaluation is based on an existing object with the same key in the bucket. The operation is allowed only if the preconditions are satisfied. If no object exists for the key, these headers are ignored. * **CopyObject** and **UploadPartCopy**: Adds conditional reads on the copy source object with the following headers: * `x-amz-copy-source-if-match` * `x-amz-copy-source-if-none-match` * `x-amz-copy-source-if-modified-since` * `x-amz-copy-source-if-unmodified-since` The first two are ETag comparisons, while the latter two compare against the copy source’s `LastModified` timestamp. * **AbortMultipartUpload**: Supports the `x-amz-if-match-initiated-time` header, which is true only if the multipart upload’s initialization time matches. * **DeleteObject**: Adds support for: * `If-Match` (ETag comparison) * `x-amz-if-match-last-modified-time` (LastModified comparison) * `x-amz-if-match-size` (object size comparison) Additionally, this PR updates precondition date parsing logic to support both **RFC1123** and **RFC3339** formats. Dates set in the future are ignored, matching AWS S3 behavior.