fix(s3): advertise byte ranges on head object (#2802)

This commit is contained in:
安正超
2026-05-05 12:29:25 +08:00
committed by GitHub
parent 36b3d21c44
commit 3208f930c5
3 changed files with 59 additions and 1 deletions
+4 -1
View File
@@ -131,6 +131,8 @@ use tokio_util::io::{ReaderStream, StreamReader};
use tracing::{debug, error, info, instrument, warn};
use uuid::Uuid;
const ACCEPT_RANGES_BYTES: &str = "bytes";
struct DeadlockRequestGuard {
deadlock_detector: Arc<deadlock_detector::DeadlockDetector>,
request_id: String,
@@ -2117,7 +2119,7 @@ impl DefaultObjectUsecase {
last_modified,
content_type,
content_encoding: info.content_encoding.clone(),
accept_ranges: Some("bytes".to_string()),
accept_ranges: Some(ACCEPT_RANGES_BYTES.to_string()),
content_range,
e_tag: info.etag.map(|etag| to_s3s_etag(&etag)),
metadata: filter_object_metadata(&info.user_defined),
@@ -3625,6 +3627,7 @@ impl DefaultObjectUsecase {
cache_control,
content_disposition,
content_language,
accept_ranges: Some(ACCEPT_RANGES_BYTES.to_string()),
website_redirect_location,
expires,
last_modified,