From: Yehuda Sadeh Date: Fri, 18 Jul 2014 21:52:48 +0000 (-0700) Subject: rgw: dump prefix unconditionally X-Git-Tag: v0.84~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7209c11251d42227608bc54cc69232ef62ffe80;p=ceph.git rgw: dump prefix unconditionally 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 --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index f6291a0ea7ef..79de0732a2af 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -254,8 +254,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);