rgw: return the version id in get object and object metadata request.
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
op_ret = read_op.prepare();
if (op_ret < 0)
goto done_err;
+ version_id = read_op.state.obj.key.instance;
+ /* STAT ops don't need data, and do no i/o */
+ if (get_type() == RGW_OP_STAT_OBJ) {
+ return;
+ }
+
/* start gettorrent */
if (torrent.get_flag())
{
}
}
+ for (auto &it : crypt_http_responses)
+ dump_header(s, it.first, it.second);
+
dump_content_length(s, total_len);
dump_last_modified(s, lastmod);
+ if (!version_id.empty()) {
+ dump_header(s, "x-amz-version-id", version_id);
+ }
+
if (! op_ret) {
if (! lo_etag.empty()) {