Skip to content

Commit

Permalink
Fix version not loaded
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Jan 8, 2025
1 parent 479becb commit b00769f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/services/cos/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,16 @@ impl Access for CosBackend {
let status = resp.status();

match status {
StatusCode::OK => parse_into_metadata(path, resp.headers()).map(RpStat::new),
StatusCode::OK => {
let headers = resp.headers();
let mut meta = parse_into_metadata(path, headers)?;

if let Some(v) = parse_header_to_str(headers, "x-cos-version-id")? {
meta.set_version(v);
}

Ok(RpStat::new(meta))
}
_ => Err(parse_error(resp)),
}
}
Expand Down

0 comments on commit b00769f

Please sign in to comment.