chore(deps): update s3s to upstream main (#6203)

* deps: update s3s to upstream main

* deps: refresh s3s upstream revision

* deps: pin s3s to latest upstream main

---------

Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
GatewayJ
2026-08-18 21:46:56 +08:00
committed by GitHub
parent 1d056d7605
commit 91c97f3416
3 changed files with 26 additions and 2 deletions
+24
View File
@@ -349,6 +349,30 @@ mod tests {
);
}
#[test]
fn metadata_operation_matches_unconfigured_host_fallbacks() {
let host = MultiDomain::new(["s3.example.com", "s3.example.com:9000"]).expect("valid test host domain");
let mut path_style_headers = HeaderMap::new();
path_style_headers.insert(HOST, "localhost:9000".parse().expect("valid host header"));
let path_style = metadata_operation(
&Method::GET,
&uri("/path-bucket?list-type=2&metadata=true"),
&path_style_headers,
Some(&host),
)
.expect("unmatched host with a port should use path-style routing");
assert_eq!(path_style.operation, MetadataOperation::ListObjectsV2);
assert_eq!(path_style.bucket, "path-bucket");
let mut cname_headers = HeaderMap::new();
cname_headers.insert(HOST, "cdn.example.org".parse().expect("valid host header"));
let cname = metadata_operation(&Method::GET, &uri("/?list-type=2&metadata=true"), &cname_headers, Some(&host))
.expect("unmatched valid bucket host should use CNAME routing");
assert_eq!(cname.operation, MetadataOperation::ListObjectsV2);
assert_eq!(cname.bucket, "cdn.example.org");
}
#[test]
fn list_objects_v2_input_parses_query_headers_and_decodes_bucket() {
let mut headers = HeaderMap::new();