]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: set a special object locator if object starts with underscore
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 22 Apr 2015 00:31:41 +0000 (17:31 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 4 May 2015 18:54:10 +0000 (12:54 -0600)
Fixes: #11442
Backport: hammer

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 3d4a1d20b86a5a00556df3d6a8dba096509274b7)

src/rgw/rgw_common.h

index 75f72281dadbb64e859aca0e6df5e0305634e159..e1688ee369914c6adb3cb51f538b4e9cec182e05 100644 (file)
@@ -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();
   }
 
   /*