]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add missing close_section in send_versioned_response 28946/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 9 Jul 2019 19:30:38 +0000 (15:30 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 9 Jul 2019 19:34:44 +0000 (15:34 -0400)
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 <cbodley@redhat.com>
src/rgw/rgw_rest_s3.cc

index bda79d16135a8ea0428e7f87ba872500c64029a4..45434f9b8beb305ead75a68c73660a92d2f22f1f 100644 (file)
@@ -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);
 }