]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: S3 Delete Bucket Policy should return 204 on success
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:20 +0000 (11:53 -0500)
commit40c873546a50f6c1de026c52bc344f171b1a983c
tree41709ef3d83d05a40a699355169cfd602881d4be
parent0adabb5e7d55c87272bbe4ca8465a09e865a65fa
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