diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-12 12:43:33 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-24 21:04:40 +0100 |
commit | 6dab836f3a5646af4a06afa52338702d82c6eb9d (patch) | |
tree | ef2817d2453d4979bc9ab0e3381476277989bc34 /src/api/api_server.rs | |
parent | 513a6b15f99983c2054b95c6a17cebf672dbd360 (diff) | |
download | garage-6dab836f3a5646af4a06afa52338702d82c6eb9d.tar.gz garage-6dab836f3a5646af4a06afa52338702d82c6eb9d.zip |
Multipart improvements
- support part_number for HeadObject
- add checks in complete_multipart_upload
Diffstat (limited to 'src/api/api_server.rs')
-rw-r--r-- | src/api/api_server.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/api_server.rs b/src/api/api_server.rs index e02b9204..315116c8 100644 --- a/src/api/api_server.rs +++ b/src/api/api_server.rs @@ -157,8 +157,12 @@ async fn handler_inner(garage: Arc<Garage>, req: Request<Body>) -> Result<Respon let resp = match endpoint { Endpoint::Options => handle_options(&req, &bucket).await, - Endpoint::HeadObject { key, .. } => handle_head(garage, &req, bucket_id, &key).await, - Endpoint::GetObject { key, .. } => handle_get(garage, &req, bucket_id, &key).await, + Endpoint::HeadObject { + key, part_number, .. + } => handle_head(garage, &req, bucket_id, &key, part_number).await, + Endpoint::GetObject { + key, part_number, .. + } => handle_get(garage, &req, bucket_id, &key, part_number).await, Endpoint::UploadPart { key, part_number, |