diff --git a/core/src/services/swift/core.rs b/core/src/services/swift/core.rs index bac9f48b4f55..1eb0f3d2a94e 100644 --- a/core/src/services/swift/core.rs +++ b/core/src/services/swift/core.rs @@ -271,10 +271,7 @@ mod tests { hash: "5e6b5b70b0426b1cc1968003e1afa5ad".to_string(), name: "test.txt".to_string(), last_modified: "2023-11-01T03:00:23.147480".to_string(), - content_type: Some( - "multipart/form-data;boundary=------------------------25004a866ee9c0cb" - .to_string() - ), + content_type: Some("text/plain".to_string()), } ); diff --git a/core/src/services/swift/lister.rs b/core/src/services/swift/lister.rs index cb3af9b2c06b..ee90a1753777 100644 --- a/core/src/services/swift/lister.rs +++ b/core/src/services/swift/lister.rs @@ -95,7 +95,9 @@ impl oio::PageList for SwiftLister { meta.set_content_length(bytes); meta.set_content_md5(hash.as_str()); - // we'll change "2023-10-28T19:18:11.682610" to "2023-10-28T19:18:11.682610Z" + // OpenStack Swift returns time without 'Z' at the end, + // which causes an error in parse_datetime_from_rfc3339. + // we'll change "2023-10-28T19:18:11.682610" to "2023-10-28T19:18:11.682610Z". if !last_modified.ends_with('Z') { last_modified.push('Z'); }