diff options
author | Alex Auvolat <alex@adnab.me> | 2020-05-01 14:30:50 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-05-01 14:30:50 +0000 |
commit | 33249717010b1173fc28ba188e5fe6d580fbf393 (patch) | |
tree | eb9253a961584ac164fdaae60ba3b84b8e7ae4ab /src/api/http_util.rs | |
parent | 3686f100b7e46d60758e4a1cc70586444ddb5f7a (diff) | |
download | garage-33249717010b1173fc28ba188e5fe6d580fbf393.tar.gz garage-33249717010b1173fc28ba188e5fe6d580fbf393.zip |
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)
Diffstat (limited to 'src/api/http_util.rs')
-rw-r--r-- | src/api/http_util.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<Vec<u8>> for BytesBody { Self::new(Bytes::from(x)) } } + +pub fn empty_body() -> BodyType { + Box::new(BytesBody::from(vec![])) +} |