mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 12:26:37 +00:00
fix: implement get_object_torrent to return 404 NoSuchKey (#1575)
Signed-off-by: 安正超 <anzhengchao@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -98,3 +98,4 @@ Do not commit secrets or cloud credentials; prefer environment variables or vaul
|
|||||||
- NEVER create files unless they're absolutely necessary for achieving your goal
|
- NEVER create files unless they're absolutely necessary for achieving your goal
|
||||||
- ALWAYS prefer editing an existing file to creating a new one
|
- ALWAYS prefer editing an existing file to creating a new one
|
||||||
- NEVER proactively create documentation files (*.md) or README files unless explicitly requested
|
- NEVER proactively create documentation files (*.md) or README files unless explicitly requested
|
||||||
|
- NEVER commit PR description files (e.g., PR_DESCRIPTION.md): These are temporary reference files for creating pull requests and should remain local only
|
||||||
|
|||||||
@@ -2830,6 +2830,14 @@ impl S3 for FS {
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[instrument(level = "debug", skip(self, _req))]
|
||||||
|
async fn get_object_torrent(&self, _req: S3Request<GetObjectTorrentInput>) -> S3Result<S3Response<GetObjectTorrentOutput>> {
|
||||||
|
// Torrent functionality is not implemented in RustFS
|
||||||
|
// Per S3 API test expectations, return 404 NoSuchKey (not 501 Not Implemented)
|
||||||
|
// This allows clients to gracefully handle the absence of torrent support
|
||||||
|
Err(S3Error::new(S3ErrorCode::NoSuchKey))
|
||||||
|
}
|
||||||
|
|
||||||
#[instrument(level = "debug", skip(self, req))]
|
#[instrument(level = "debug", skip(self, req))]
|
||||||
async fn head_bucket(&self, req: S3Request<HeadBucketInput>) -> S3Result<S3Response<HeadBucketOutput>> {
|
async fn head_bucket(&self, req: S3Request<HeadBucketInput>) -> S3Result<S3Response<HeadBucketOutput>> {
|
||||||
let input = req.input;
|
let input = req.input;
|
||||||
|
|||||||
@@ -139,3 +139,4 @@ test_ranged_request_invalid_range
|
|||||||
test_set_multipart_tagging
|
test_set_multipart_tagging
|
||||||
test_upload_part_copy_percent_encoded_key
|
test_upload_part_copy_percent_encoded_key
|
||||||
test_api_error_from_storage_error_mappings
|
test_api_error_from_storage_error_mappings
|
||||||
|
test_get_object_torrent
|
||||||
|
|||||||
@@ -179,4 +179,3 @@ test_set_get_del_bucket_policy
|
|||||||
# Object attributes and torrent tests
|
# Object attributes and torrent tests
|
||||||
test_create_bucket_no_ownership_controls
|
test_create_bucket_no_ownership_controls
|
||||||
test_get_checksum_object_attributes
|
test_get_checksum_object_attributes
|
||||||
test_get_object_torrent
|
|
||||||
|
|||||||
Reference in New Issue
Block a user