1.1 KiB
1.1 KiB
POST3-006: S3 bucket and object handlers
Status: Done Priority: P1 Blocked by: POST3-005
Description
Implement all S3 HTTP request handlers that bridge the S3 REST API to the core Store API.
Acceptance Criteria
Bucket handlers (s3/handlers/buckets.rs)
- CreateBucket — PUT /{bucket} → 200 + Location header
- HeadBucket — HEAD /{bucket} → 200 or 404
- DeleteBucket — DELETE /{bucket} → 204 (409 if not empty)
- ListBuckets — GET / → 200 + XML
Object handlers (s3/handlers/objects.rs)
- PutObject — PUT /{bucket}/{key} → 200 + ETag header; reads x-amz-meta- from request headers
- GetObject — GET /{bucket}/{key} → 200 + body + ETag + Content-Type + Content-Length + Last-Modified + x-amz-meta- headers
- HeadObject — HEAD /{bucket}/{*key} → 200 + metadata headers (no body)
- DeleteObject — DELETE /{bucket}/{*key} → 204
- ListObjectsV2 — GET /{bucket}?list-type=2 → 200 + XML
Error handling
- NoSuchBucket → 404 + XML error
- NoSuchKey → 404 + XML error
- BucketAlreadyOwnedByYou → 409 + XML error
- BucketNotEmpty → 409 + XML error