]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: S3 Put Bucket Policy should return 204 on success 38623/head
authorMatthew Oliver <moliver@suse.com>
Thu, 14 May 2020 01:31:56 +0000 (11:31 +1000)
committerNathan Cutler <ncutler@suse.com>
Wed, 16 Dec 2020 18:34:58 +0000 (19:34 +0100)
commitbefc673930c8de930faa4f27673deee49a1aa8be
tree2ea5d6b70a42622e8c1ec8ba052dc68789d2d386
parent7e3e4e73783a98bb07ab399438eb3aab41a6fc8b
rgw: S3 Put Bucket Policy should return 204 on success

Currently RGW returns a 200 on a successful PUT on a bucket policy but
the S3 api extects a 204, which makes sense as it's a success without
any contect returned:

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

The sample response in the example above is a 204.

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

Fixes: https://tracker.ceph.com/issues/45467
Signed-off-by: Matthew Oliver <moliver@suse.com>
(cherry picked from commit 7fddff78c98ef9a3c73581b892c7dfa04b64cdb3)
src/rgw/rgw_op.cc