diff --git a/.woodpecker.yml b/.woodpecker.yml index d14bc3d..b82dd94 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,6 @@ variables: - - &rust_image "rust:1.77-bullseye" - + - &rust_image "rust:1.78-bullseye" + steps: cargo_fmt: image: rustdocker/rust:nightly diff --git a/Cargo.toml b/Cargo.toml index eabcee6..522a84a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,8 +19,8 @@ warnings = "deny" deprecated = "deny" [lints.clippy] -perf = "deny" -complexity = "deny" +perf = { level = "deny", priority = -1 } +complexity = { level = "deny", priority = -1 } dbg_macro = "deny" inefficient_to_string = "deny" items-after-statements = "deny" @@ -61,7 +61,7 @@ bytes = "1.6.0" futures-core = { version = "0.3.30", default-features = false } pin-project-lite = "0.2.14" activitystreams-kinds = "0.3.0" -regex = { version = "1.10.4", default-features = false, features = ["std", "unicode-case"] } +regex = { version = "1.10.5", default-features = false, features = ["std", "unicode"] } tokio = { version = "1.37.0", features = [ "sync", "rt", diff --git a/src/fetch/mod.rs b/src/fetch/mod.rs index 67165a9..f078cf6 100644 --- a/src/fetch/mod.rs +++ b/src/fetch/mod.rs @@ -65,9 +65,9 @@ pub async fn fetch_object_http( let content_type = res .content_type .as_ref() - .and_then(|c| c.to_str().ok()) + .and_then(|c| Some(c.to_str().ok()?.to_lowercase())) .ok_or(Error::FetchInvalidContentType(res.url.clone()))?; - if !VALID_RESPONSE_CONTENT_TYPES.contains(&content_type) { + if !VALID_RESPONSE_CONTENT_TYPES.contains(&content_type.as_str()) { return Err(Error::FetchInvalidContentType(res.url)); }