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:
安正超
2026-01-21 21:49:22 +08:00
committed by GitHub
parent 0320508f8d
commit 87ead2bea3
4 changed files with 10 additions and 1 deletions
+8
View File
@@ -2830,6 +2830,14 @@ impl S3 for FS {
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))]
async fn head_bucket(&self, req: S3Request<HeadBucketInput>) -> S3Result<S3Response<HeadBucketOutput>> {
let input = req.input;