]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: S3 Delete Bucket Policy should return 204 on success 61432/head
authorSimon Jürgensmeyer <simon.juergensmeyer@hetzner-cloud.de>
Wed, 15 Jan 2025 08:08:38 +0000 (09:08 +0100)
committerCasey Bodley <cbodley@redhat.com>
Fri, 17 Jan 2025 16:53:53 +0000 (11:53 -0500)
commitb48ad65ef40f8715dbdb32a18c831c4fee2ddca6
tree41fafb715484c7dd95bc5b1486910748fdcd826a
parentc2a2fa8ac29e77898c58dfaac85181686bc82d72
rgw: S3 Delete Bucket Policy should return 204 on success

Currently, RGW returns a 200 on a successful DELETE on a bucket policy but
the S3 API expects a 204:

    https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html

The sample response in the example above is a 204.

This patch checks the op_ret in `RGWDeleteBucketPolicy::send_response()`
and on a success we turn it to a 204 (or STATUS_NO_CONTENT).

Fixes: https://tracker.ceph.com/issues/69539
Signed-off-by: Simon Jürgensmeyer <simon.juergensmeyer@hetzner-cloud.de>
(cherry picked from commit 466930b473292978b30a60e410dc755140ecb843)
src/rgw/rgw_op.cc