Skip to content

Commit eab096c

Browse files
committed
rgw: fix empty storage class on display of multipart uploads
Some multipart uploads do not have a stored storage class, however the code is written such that an empty storage class is treated as the "STANDARD" storage class. So when encoding the storage class in JSON, use the canonical storage. Signed-off-by: J. Eric Ivancich <[email protected]>
1 parent ee6523b commit eab096c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cls/rgw/cls_rgw_types.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ void rgw_bucket_dir_entry_meta::dump(Formatter *f) const
194194
utime_t ut(mtime);
195195
encode_json("mtime", ut, f);
196196
encode_json("etag", etag, f);
197-
encode_json("storage_class", storage_class, f);
197+
encode_json("storage_class",
198+
rgw_placement_rule::get_canonical_storage_class(storage_class),
199+
f);
198200
encode_json("owner", owner, f);
199201
encode_json("owner_display_name", owner_display_name, f);
200202
encode_json("content_type", content_type, f);

0 commit comments

Comments
 (0)