]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: path paramter for pseudo folders
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 24 Mar 2011 19:11:41 +0000 (12:11 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 24 Mar 2011 19:11:41 +0000 (12:11 -0700)
src/rgw/rgw_op.cc

index 27f8660e1d48df45702a7a9220c91dea876d4771..2843f63a3f14d4818c920fc12e450eb236a87828 100644 (file)
@@ -280,6 +280,18 @@ void RGWListBucket::execute()
   }
   url_decode(s->args.get("delimiter"), delimiter);
 
+  if (s->prot_flags & RGW_REST_OPENSTACK) {
+    string path_args = s->args.get("path");
+    if (!path_args.empty()) {
+      if (!delimiter.empty() || !prefix.empty()) {
+        ret = -EINVAL;
+        goto done;
+      }
+      url_decode(path_args, prefix);
+      delimiter="/";
+    }
+  }
+
   ret = rgwstore->list_objects(s->user.user_id, s->bucket_str, max, prefix, delimiter, marker, objs, common_prefixes,
                                !!(s->prot_flags & RGW_REST_OPENSTACK));
 done: