]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: return 204 on bucket public access block deletion
authorSeena Fallah <seenafallah@gmail.com>
Tue, 20 Feb 2024 14:54:06 +0000 (15:54 +0100)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Mon, 27 Jan 2025 18:59:38 +0000 (01:59 +0700)
According to AWS doc (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html#API_DeletePublicAccessBlock_ResponseSyntax) 204 shall be returned on delete request.

Fixes: https://tracker.ceph.com/issues/64492
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 48a454971c9979dfd9a95cc9619ca864aeda26a5)

src/rgw/rgw_op.cc

index c4e856b63b99b081aa094f0160d49d7a681c424b..586cde7eb8ee379ea02e77bf87c5393ffab1d0f6 100644 (file)
@@ -8831,9 +8831,12 @@ void RGWGetBucketPublicAccessBlock::execute(optional_yield y)
 
 void RGWDeleteBucketPublicAccessBlock::send_response()
 {
-  if (op_ret) {
-    set_req_state_err(s, op_ret);
+  if (!op_ret) {
+    /* A successful Delete request should return a 204 */
+    op_ret = STATUS_NO_CONTENT;
   }
+
+  set_req_state_err(s, op_ret);
   dump_errno(s);
   end_header(s);
 }