Skip to content

Commit 48a4549

Browse files
committed
rgw: return 204 on bucket public access block deletion
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 <[email protected]>
1 parent 146d4d9 commit 48a4549

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/rgw/rgw_op.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9017,9 +9017,12 @@ void RGWGetBucketPublicAccessBlock::execute(optional_yield y)
90179017

90189018
void RGWDeleteBucketPublicAccessBlock::send_response()
90199019
{
9020-
if (op_ret) {
9021-
set_req_state_err(s, op_ret);
9020+
if (!op_ret) {
9021+
/* A successful Delete request should return a 204 */
9022+
op_ret = STATUS_NO_CONTENT;
90229023
}
9024+
9025+
set_req_state_err(s, op_ret);
90239026
dump_errno(s);
90249027
end_header(s);
90259028
}

0 commit comments

Comments
 (0)