mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 17:41:01 +00:00
ETag patch
This commit is contained in:
parent
601ae25ad2
commit
fed97f37e1
1 changed files with 7 additions and 3 deletions
|
@ -273,10 +273,10 @@ impl BodyChunker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn put_response(version_uuid: UUID, etag: String) -> Response<Body> {
|
pub fn put_response(version_uuid: UUID, md5sum_hex: String) -> Response<Body> {
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.header("x-amz-version-id", hex::encode(version_uuid))
|
.header("x-amz-version-id", hex::encode(version_uuid))
|
||||||
.header("ETag", etag)
|
.header("ETag", format!("\"{}\"", md5sum_hex))
|
||||||
.body(Body::from(vec![]))
|
.body(Body::from(vec![]))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,11 @@ pub async fn handle_put_part(
|
||||||
content_sha256,
|
content_sha256,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(Response::new(Body::from(vec![])))
|
let response = Response::builder()
|
||||||
|
.header("ETag", format!("\"{}\"", hex::encode(md5sum_arr)))
|
||||||
|
.body(Body::from(vec![]))
|
||||||
|
.unwrap();
|
||||||
|
Ok(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn handle_complete_multipart_upload(
|
pub async fn handle_complete_multipart_upload(
|
||||||
|
|
Loading…
Reference in a new issue