]> 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)
committerSimon Jürgensmeyer <simon.juergensmeyer@hetzner-cloud.de>
Wed, 15 Jan 2025 08:23:55 +0000 (09:23 +0100)
commit466930b473292978b30a60e410dc755140ecb843
tree24b1dbd159c4f3a819a4d3db7213280094627c51
parentf992060449337cc370ed9bda1e001bf7f4e78040
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>
src/rgw/rgw_op.cc