client rebuilding in progress
This commit is contained in:
@@ -321,17 +321,27 @@ func (oper *Operator) GetManifest(ctx context.Context, params *GetManifestParams
|
||||
if !exists {
|
||||
return res, http.StatusNotFound, err
|
||||
}
|
||||
/*
|
||||
index, indexBytes, err := indexFromManigestDescrs(manifestDescrs)
|
||||
if err != nil {
|
||||
return res, http.StatusInternalServerError, err
|
||||
}
|
||||
indexDigest := auxoci.SHA256DigestFromString(indexBytes)
|
||||
res.DockerContentDigest = indexDigest.String()
|
||||
|
||||
index, indexBytes, err := indexFromManigestDescrs(manifestDescrs)
|
||||
if err != nil {
|
||||
return res, http.StatusInternalServerError, err
|
||||
}
|
||||
indexDigest := auxoci.SHA256DigestFromString(indexBytes)
|
||||
res.DockerContentDigest = indexDigest.String()
|
||||
res.ContentLength = strconv.FormatInt(int64(len(indexBytes)), 10)
|
||||
res.ContentType = index.MediaType
|
||||
res.Payload = string(indexBytes)
|
||||
*/
|
||||
manifestDescr = manifestDescrs[0]
|
||||
|
||||
manifestDigest := auxoci.SHA256DigestFromString(manifestDescr.Payload)
|
||||
res.DockerContentDigest = manifestDigest.String()
|
||||
|
||||
res.ContentLength = strconv.FormatInt(int64(len(manifestDescr.Payload)), 10)
|
||||
res.ContentType = manifestDescr.ContentType
|
||||
res.Payload = manifestDescr.Payload
|
||||
|
||||
res.ContentLength = strconv.FormatInt(int64(len(indexBytes)), 10)
|
||||
res.ContentType = index.MediaType
|
||||
res.Payload = string(indexBytes)
|
||||
}
|
||||
return res, http.StatusOK, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user