mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-31 17:28:13 +00:00
Merge pull request 'fix: return 204 on successful AbortMultipartUpload' (#1095) from nikeee/garage:fix-abort-multipart-upload into main-v2
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1095
This commit is contained in:
@@ -5,6 +5,7 @@ use std::sync::Arc;
|
|||||||
use base64::prelude::*;
|
use base64::prelude::*;
|
||||||
use crc_fast::{CrcAlgorithm, Digest as CrcDigest};
|
use crc_fast::{CrcAlgorithm, Digest as CrcDigest};
|
||||||
use futures::prelude::*;
|
use futures::prelude::*;
|
||||||
|
use http::StatusCode;
|
||||||
use hyper::{header::HeaderValue, HeaderMap, Request, Response};
|
use hyper::{header::HeaderValue, HeaderMap, Request, Response};
|
||||||
use md5::{Digest, Md5};
|
use md5::{Digest, Md5};
|
||||||
use sha1::Sha1;
|
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]);
|
let final_object = Object::new(*bucket_id, key.to_string(), vec![object_version]);
|
||||||
garage.object_table.insert(&final_object).await?;
|
garage.object_table.insert(&final_object).await?;
|
||||||
|
|
||||||
Ok(Response::new(empty_body()))
|
Ok(Response::builder()
|
||||||
|
.status(StatusCode::NO_CONTENT)
|
||||||
|
.body(empty_body())?)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======== helpers ============
|
// ======== helpers ============
|
||||||
|
|||||||
Reference in New Issue
Block a user