Slightly improved S3 compatibility

- ListBucket does not require any of the parameters (delimiter,
    prefix, max-keys, etc)
- URLs are properly percent_decoded
- PutObject and DeleteObject calls now answer correctly
    (empty body, version id in the x-amz-version-id: header)
This commit is contained in:
Alex Auvolat
2020-05-01 14:30:50 +00:00
parent 3686f100b7
commit 3324971701
6 changed files with 83 additions and 47 deletions
+5 -3
View File
@@ -195,9 +195,11 @@ impl BodyChunker {
}
}
fn put_response(version_uuid: UUID) -> Response<BodyType> {
let resp_bytes = format!("{}\n", hex::encode(version_uuid));
Response::new(Box::new(BytesBody::from(resp_bytes)))
pub fn put_response(version_uuid: UUID) -> Response<BodyType> {
Response::builder()
.header("x-amz-version-id", hex::encode(version_uuid))
.body(empty_body())
.unwrap()
}
pub async fn handle_create_multipart_upload(