From ebb7c18bca22674f46563fc68e7062c055c99417 Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Mon, 11 Aug 2025 13:01:53 +0300 Subject: [PATCH] fix: include OCI image manifest MIME type in `Accept` header when checking for a digest update Closes #132 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/registry.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b565a8d..2ae70ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -376,7 +376,7 @@ dependencies = [ [[package]] name = "cup" -version = "3.4.1" +version = "3.4.2" dependencies = [ "bollard", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 2cb750b..6aecffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cup" -version = "3.4.1" +version = "3.4.2" edition = "2021" [dependencies] diff --git a/src/registry.rs b/src/registry.rs index bfe5384..c1b352f 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -58,7 +58,7 @@ pub async fn get_latest_digest( protocol, &image.parts.registry, &image.parts.repository, &image.parts.tag ); let authorization = to_bearer_string(&token); - let headers = [("Accept", Some("application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json")), ("Authorization", authorization.as_deref())]; + let headers = [("Accept", Some("application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.oci.image.manifest.v1+json")), ("Authorization", authorization.as_deref())]; let response = client.head(&url, &headers).await; let time = start.elapsed().unwrap().as_millis() as u32;