From 71aef8770ed8ffe158345bfc847ba4ee12132f4e Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 8 Jul 2025 17:33:48 +0200 Subject: [PATCH] fix: GetBucketCORS returns 404 if there are no policies Similar issue @ ceph: https://github.com/ceph/ceph/pull/27122/files https://tracker.ceph.com/issues/38886 Implementation @ minio: https://github.com/minio/minio/blob/de234b888c26cc191f3062a625af82640c966795/cmd/dummy-handlers.go#L196 --- src/api/s3/cors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/s3/cors.rs b/src/api/s3/cors.rs index fcfdb934..d746ff8d 100644 --- a/src/api/s3/cors.rs +++ b/src/api/s3/cors.rs @@ -29,7 +29,7 @@ pub async fn handle_get_cors(ctx: ReqCtx) -> Result, Error> { .body(string_body(xml))?) } else { Ok(Response::builder() - .status(StatusCode::NO_CONTENT) + .status(StatusCode::NOT_FOUND) .body(empty_body())?) } }