]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: dump prefix unconditionally
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 18 Jul 2014 21:52:48 +0000 (14:52 -0700)
committerSage Weil <sage@redhat.com>
Sun, 20 Jul 2014 03:51:48 +0000 (20:51 -0700)
As part of issue #8858, and to be more in line with S3, dump the Prefix
field when listing bucket even if bucket is empty.

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

src/rgw/rgw_rest_s3.cc

index 84499b0e43ec16ced7633621a76beef696fe7917..c7961f4a9c53443802937b71d3d1e80b200f3985 100644 (file)
@@ -251,8 +251,7 @@ void RGWListBucket_ObjStore_S3::send_response()
   s->formatter->open_object_section_in_ns("ListBucketResult",
                                          "http://s3.amazonaws.com/doc/2006-03-01/");
   s->formatter->dump_string("Name", s->bucket_name_str);
-  if (!prefix.empty())
-    s->formatter->dump_string("Prefix", prefix);
+  s->formatter->dump_string("Prefix", prefix);
   s->formatter->dump_string("Marker", marker);
   if (is_truncated && !next_marker.empty())
     s->formatter->dump_string("NextMarker", next_marker);