From 5b1b6afae2b9852521166365e537cdcc8f204f85 Mon Sep 17 00:00:00 2001 From: Oleg Bulatov Date: Fri, 16 Jun 2017 15:51:29 +0200 Subject: [PATCH] Update Docker-Content-Digest if manifest list is rewritten If the client doesn't support manifest lists, the registry will rewrite a manifest list into the old format. The Docker-Content-Digest header should be updated in this case. Signed-off-by: Oleg Bulatov --- registry/handlers/manifests.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/registry/handlers/manifests.go b/registry/handlers/manifests.go index 75e3d1dd4..f406903fa 100644 --- a/registry/handlers/manifests.go +++ b/registry/handlers/manifests.go @@ -183,6 +183,8 @@ func (imh *manifestHandler) GetManifest(w http.ResponseWriter, r *http.Request) if err != nil { return } + } else { + imh.Digest = manifestDigest } }