Bug #23506
closed[rgw] GET <object>?torrent returns object's body instead torrent-file
0%
Description
i use awscli:
aws --endpoint-url=http://my-domain.ru s3api get-object-torrent --bucket my-bucket --key test.png test.torrent
and i get object test.png instead torrent-file.
"obj_size": 169494
in rgw log(debug rgw = 20) i didn't see any errors or exceptions.
torrent relative parameters:
"rgw_torrent_comment": "",
"rgw_torrent_createby": "",
"rgw_torrent_encoding": "",
"rgw_torrent_flag": "true",
"rgw_torrent_origin": "",
"rgw_torrent_sha_unit": "524288",
"rgw_torrent_tracker": "",
Updated by Robin Johnson about 6 years ago
Brief debugging because I saw similar as well, and I think this behavior would be an improvement:
0. If rgw_torrent_flag==FALSE, we should always return an error.
1. If the object was uploaded with rgw_torrent_flag==TRUE, and rgw_torrent_flag then the torrent should be returned.
2. If the object was uploaded with rgw_torrent_flag==FALSE, then we should return an error.
Updated by Casey Bodley almost 6 years ago
- Status changed from New to Fix Under Review
- Assignee set to Casey Bodley
- Tags set to torrent
- Backport set to luminous
Updated by Casey Bodley almost 6 years ago
Thanks Robin. My recollection is that we just didn't want to do the SHA calculation and omap request for every upload by default, so the flag was added to control that. So I propose that rgw_torrent_flag be interpreted only as 'generate the SHA/torrent info on object upload', and allow GET ?torrent requests to read any object that has torrent info.
Updated by Casey Bodley almost 6 years ago
- Related to Bug #23838: save_torrent_file writes to omap (not atomic, not supported on ec pools) added
Updated by Casey Bodley almost 6 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler almost 6 years ago
- Copied to Backport #23865: luminous: [rgw] GET <object>?torrent returns object's body instead torrent-file added
Updated by Nathan Cutler almost 6 years ago
- Status changed from Pending Backport to Resolved