protected:
std::string version_id;
std::string expected_bucket_owner;
- int marker{0};
- int max_parts{1000};
+ std::optional<int> marker;
+ std::optional<int> max_parts;
uint16_t requested_attributes{0};
#if 0
/* used to decrypt attributes for objects stored with SSE-C */
<< err << dendl;
return -ERR_INVALID_PART;
}
- max_parts = std::min(max_parts, 1000);
+ max_parts = std::min(*max_parts, 1000);
}
hdr = env->get_optional("HTTP_X_AMZ_PART_NUMBER_MARKER");
int ret =
s->object->list_parts(
- this, s->cct, max_parts, marker,
+ this, s->cct,
+ max_parts ? *max_parts : 1000,
+ marker ? *marker : 0,
&next_marker, &truncated,
[&](const Object::Part& part) -> int {
s->formatter->open_object_section("Part");
s->formatter->dump_int("PartsCount", *multipart_parts_count);
s->formatter->dump_int("TotalPartsCount", *multipart_parts_count);
s->formatter->dump_bool("IsTruncated", truncated);
- s->formatter->dump_int("MaxParts", max_parts);
- s->formatter->dump_int("NextPartNumberMarker", next_marker);
- s->formatter->dump_int("PartNumberMarker", marker);
+ if (max_parts) {
+ s->formatter->dump_int("MaxParts", *max_parts);
+ }
+ if(truncated) {
+ s->formatter->dump_int("NextPartNumberMarker", next_marker);
+ }
+ if (marker) {
+ s->formatter->dump_int("PartNumberMarker", *marker);
+ }
s->formatter->close_section();
} /* multipart_parts_count positive */
} /* ObjectParts */