0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

fix(routes): set Content-Length on GetManifest (#1019)

notation sign image index exits with "missing Content-Length" error

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu 2022-11-24 20:53:48 +02:00 committed by GitHub
parent f75bce3085
commit 4753a0f587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}