]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix bugs in listobjectsv1
authoralbIN7 <aantony@redhat.com>
Wed, 3 Jul 2019 19:26:50 +0000 (00:56 +0530)
committeralbIN7 <aantony@redhat.com>
Tue, 9 Jul 2019 08:23:31 +0000 (13:53 +0530)
Fixes: https://tracker.ceph.com/issues/40663
Signed-off-by: Albin Antony <aantony@redhat.com>
src/rgw/rgw_rest_s3.cc

index bce2ca9457698f0c394b48799762129508b84328..4cc7db32f5c86a3f3061a562ed424c5d874242b4 100644 (file)
@@ -839,21 +839,11 @@ return 0;
 
 void RGWListBucket_ObjStore_S3::send_common_versioned_response()
 {
-  
   if (!s->bucket_tenant.empty()) {
     s->formatter->dump_string("Tenant", s->bucket_tenant);
   }
   s->formatter->dump_string("Name", s->bucket_name);
   s->formatter->dump_string("Prefix", prefix);
-  s->formatter->dump_string("KeyMarker", marker.name);
-  s->formatter->dump_string("VersionIdMarker", marker.instance);
-  if (is_truncated && !next_marker.empty()) {
-    s->formatter->dump_string("NextKeyMarker", next_marker.name);
-    if (next_marker.instance.empty())
-      s->formatter->dump_string("NextVersionIdMarker", "null");  
-    else
-      s->formatter->dump_string("NextVersionIdMarker", next_marker.instance);
-  }
   s->formatter->dump_int("MaxKeys", max);
   if (!delimiter.empty()) {
     s->formatter->dump_string("Delimiter", delimiter);
@@ -889,7 +879,6 @@ void RGWListBucket_ObjStore_S3::send_versioned_response()
       s->formatter->dump_string("NextVersionIdMarker", next_marker.instance);
     }
   }
-
   bool encode_key = false;
   if (strcasecmp(encoding_type.c_str(), "url") == 0) {
     s->formatter->dump_string("EncodingType", "url");
@@ -947,11 +936,10 @@ void RGWListBucket_ObjStore_S3::send_versioned_response()
       }
       s->formatter->close_section();
     }
-
-  s->formatter->close_section();
+    s->formatter->close_section();
+  }
   rgw_flush_formatter_and_reset(s, s->formatter);
 }
-}
 
 
 void RGWListBucket_ObjStore_S3::send_common_response()