From: Yehuda Sadeh Date: Wed, 22 Apr 2015 00:31:41 +0000 (-0700) Subject: rgw: set a special object locator if object starts with underscore X-Git-Tag: v9.0.1~73^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d4a1d20b86a5a00556df3d6a8dba096509274b7;p=ceph.git rgw: set a special object locator if object starts with underscore Fixes: #11442 Backport: hammer Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index a1ae4d975f2b..1baf17862528 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -1228,6 +1228,15 @@ public: void reset_loc() { loc.clear(); + /* + * For backward compatibility. Older versions used to have object locator on all objects, + * however, the orig_obj was the effective object locator. This had the same effect as not + * having object locator at all for most objects but the ones that started with underscore as + * these were escaped. + */ + if (orig_obj[0] == '_') { + loc = orig_obj; + } } bool have_null_instance() { @@ -1265,6 +1274,7 @@ public: object.append("_"); object.append(o); } + reset_loc(); } /*