ETag patch

This commit is contained in:
Alex 2020-11-29 16:38:01 +01:00
parent 601ae25ad2
commit fed97f37e1

View file

@ -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(