Browse Source

[s3acl] Step 0: Put bucket ACL only responds success if the ACL is private. (#4856)

* Passing test:
test_bucket_acl_default
test_bucket_acl_canned_private_to_private

https://github.com/seaweedfs/seaweedfs/issues/4519

* Update weed/s3api/s3api_bucket_handlers.go

---------

Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Signed-off-by: LHHDZ <shichanglin5@qq.com>
pull/5936/head
Konstantin Lebedev 1 year ago
committed by LHHDZ
parent
commit
3add86ef9e
  1. 4
      docker/compose/s3tests.conf
  2. 1
      weed/s3api/s3api_bucket_handlers.go

4
docker/compose/s3tests.conf

@ -18,10 +18,10 @@ bucket prefix = yournamehere-{random}-
[s3 main] [s3 main]
# main display_name set in vstart.sh # main display_name set in vstart.sh
display_name = M. Tester
display_name = s3_tests
# main user_idname set in vstart.sh # main user_idname set in vstart.sh
user_id = testid
user_id = s3_tests
# main email set in vstart.sh # main email set in vstart.sh
email = tester@ceph.com email = tester@ceph.com

1
weed/s3api/s3api_bucket_handlers.go

@ -424,6 +424,7 @@ func (s3a *S3ApiServer) PutBucketOwnershipControls(w http.ResponseWriter, r *htt
defer util.CloseRequest(r) defer util.CloseRequest(r)
var v s3.OwnershipControls var v s3.OwnershipControls
err := xmlutil.UnmarshalXML(&v, xml.NewDecoder(r.Body), "") err := xmlutil.UnmarshalXML(&v, xml.NewDecoder(r.Body), "")
if err != nil { if err != nil {
s3err.WriteErrorResponse(w, r, s3err.ErrInvalidRequest) s3err.WriteErrorResponse(w, r, s3err.ErrInvalidRequest)

Loading…
Cancel
Save