]> 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)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 22 Apr 2015 20:11:26 +0000 (13:11 -0700)
Fixes: #11442
Backport: hammer

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_common.h

index a1ae4d975f2bac16f2751a89bd6cfd26ecd3808c..1baf17862528adfe059ccae86ef7f13e8270505d 100644 (file)
@@ -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();
   }
 
   /*