From ca7b438f3fa2325776be267090db6f6925f6ca51 Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Wed, 15 Dec 2021 15:05:36 +0100 Subject: [PATCH] less strict ListBuckets (#178) fix #175 Co-authored-by: Trinity Pointard Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/178 Co-authored-by: trinity-1686a Co-committed-by: trinity-1686a --- src/api/s3_router.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/api/s3_router.rs b/src/api/s3_router.rs index f205f31..4ce1d23 100644 --- a/src/api/s3_router.rs +++ b/src/api/s3_router.rs @@ -511,11 +511,7 @@ impl Endpoint { let path = uri.path().trim_start_matches('/'); let query = uri.query(); if bucket.is_none() && path.is_empty() { - if query.is_none() { - return Ok(Self::ListBuckets); - } else { - return Err(Error::BadRequest("Invalid ListBuckets query".to_owned())); - } + return Ok(Self::ListBuckets); } let (bucket, key) = if let Some(bucket) = bucket {