From 4753a0f5873fdcd2dbbd0baf02bae0d22425c107 Mon Sep 17 00:00:00 2001 From: peusebiu Date: Thu, 24 Nov 2022 20:53:48 +0200 Subject: [PATCH] fix(routes): set Content-Length on GetManifest (#1019) notation sign image index exits with "missing Content-Length" error Signed-off-by: Petu Eusebiu --- pkg/api/routes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/api/routes.go b/pkg/api/routes.go index 72f00a52..83749662 100644 --- a/pkg/api/routes.go +++ b/pkg/api/routes.go @@ -402,6 +402,8 @@ func (rh *RouteHandler) GetManifest(response http.ResponseWriter, request *http. } response.Header().Set(constants.DistContentDigestKey, digest.String()) + response.Header().Set("Content-Length", fmt.Sprintf("%d", len(content))) + response.Header().Set("Content-Type", mediaType) WriteData(response, http.StatusOK, mediaType, content) }