mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-07-26 07:58:14 +00:00
fix: return 204 on successful AbortMultipartUpload
Docs state that 204 should be returned on success: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html ```http HTTP/1.1 204 x-amz-request-charged: RequestCharged ```
This commit is contained in:
@@ -5,6 +5,7 @@ use std::sync::Arc;
|
||||
use base64::prelude::*;
|
||||
use crc_fast::{CrcAlgorithm, Digest as CrcDigest};
|
||||
use futures::prelude::*;
|
||||
use http::StatusCode;
|
||||
use hyper::{header::HeaderValue, HeaderMap, Request, Response};
|
||||
use md5::{Digest, Md5};
|
||||
use sha1::Sha1;
|
||||
@@ -548,7 +549,9 @@ pub async fn handle_abort_multipart_upload(
|
||||
let final_object = Object::new(*bucket_id, key.to_string(), vec![object_version]);
|
||||
garage.object_table.insert(&final_object).await?;
|
||||
|
||||
Ok(Response::new(empty_body()))
|
||||
Ok(Response::builder()
|
||||
.status(StatusCode::NO_CONTENT)
|
||||
.body(empty_body())?)
|
||||
}
|
||||
|
||||
// ======== helpers ============
|
||||
|
||||
Reference in New Issue
Block a user