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: v0.94.2~43^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=512ae4cb3e182ce79aca7354c66d2f2a662555da;p=ceph.git rgw: set a special object locator if object starts with underscore Fixes: #11442 Backport: hammer Signed-off-by: Yehuda Sadeh (cherry picked from commit 3d4a1d20b86a5a00556df3d6a8dba096509274b7) --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 75f72281dad..e1688ee3699 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -1224,6 +1224,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() { @@ -1261,6 +1270,7 @@ public: object.append("_"); object.append(o); } + reset_loc(); } /*