From 33249717010b1173fc28ba188e5fe6d580fbf393 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 1 May 2020 14:30:50 +0000 Subject: 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) --- src/api/http_util.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/api/http_util.rs') diff --git a/src/api/http_util.rs b/src/api/http_util.rs index 029b7020..8a8cf9d8 100644 --- a/src/api/http_util.rs +++ b/src/api/http_util.rs @@ -82,3 +82,7 @@ impl From> for BytesBody { Self::new(Bytes::from(x)) } } + +pub fn empty_body() -> BodyType { + Box::new(BytesBody::from(vec![])) +} -- cgit v1.2.3