Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octopus: rgw: S3 Put Bucket Policy should return 204 on success #38420

Merged
merged 1 commit into from Jan 20, 2021

Conversation

smithfarm
Copy link
Contributor

backport tracker: https://tracker.ceph.com/issues/48427


backport of #35059
parent tracker: https://tracker.ceph.com/issues/45467

this backport was staged using ceph-backport.sh version 15.1.1.389
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh

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 7fddff7)
@yuriw
Copy link
Contributor

yuriw commented Jan 19, 2021

@yuriw yuriw merged commit f20c2ed into ceph:octopus Jan 20, 2021
@smithfarm smithfarm deleted the wip-48427-octopus branch January 21, 2021 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants