]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW - Swift retarget needs bucket set on object 56003/head
authorDaniel Gryniewicz <dang@redhat.com>
Thu, 16 Jun 2022 15:46:24 +0000 (11:46 -0400)
committerPeter Razumovsky <prazumovsky@mirantis.com>
Wed, 6 Mar 2024 15:41:23 +0000 (19:41 +0400)
When a bucket list is retargeted to an object get, then the object may
not yet have it's bucket set.  Ensure the bucket is set on the object.

Fixes: https://tracker.ceph.com/issues/56029
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
src/rgw/rgw_rest_swift.cc

index cc75b8146524d7f95d8501e8504e90ef14d9eb25..dd8d5a47321aec47f9d6e2d6ebccec441a5a1f75 100644 (file)
@@ -2597,6 +2597,7 @@ RGWOp* RGWSwiftWebsiteHandler::get_ws_index_op()
   } else {
     s->object->set_name(s->bucket->get_info().website_conf.get_index_doc());
   }
+  s->object->set_bucket(s->bucket.get());
 
   auto getop = new RGWGetObj_ObjStore_SWIFT;
   getop->set_get_data(boost::algorithm::equals("GET", s->info.method));