From: Casey Bodley Date: Tue, 9 Jul 2019 19:30:38 +0000 (-0400) Subject: rgw: add missing close_section in send_versioned_response X-Git-Tag: v15.1.0~2158^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aff7ea5aad3868747897f06be2ae19d51f5fd804;p=ceph.git rgw: add missing close_section in send_versioned_response multisite requests use a '?objs-container' extension to wrap the entries in an array section for json decoding. send_versioned_response() was missing the close_section() to match the conditional open_array_section("Entries") Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index bda79d16135a..45434f9b8beb 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -934,9 +934,12 @@ void RGWListBucket_ObjStore_S3::send_versioned_response() } else { s->formatter->dump_string("Type", "Normal"); } - s->formatter->close_section(); + s->formatter->close_section(); // Version/DeleteMarker } - s->formatter->close_section(); + if (objs_container) { + s->formatter->close_section(); // Entries + } + s->formatter->close_section(); // ListVersionsResult } rgw_flush_formatter_and_reset(s, s->formatter); }