Merge pull request #3174 from adamwg/manifest-delete-by-tag
manifests: Return UNSUPPORTED when deleting manifests by tag
This commit is contained in:
commit
17ab8afeec
1 changed files with 5 additions and 0 deletions
|
@ -485,6 +485,11 @@ func (imh *manifestHandler) applyResourcePolicy(manifest distribution.Manifest)
|
||||||
func (imh *manifestHandler) DeleteManifest(w http.ResponseWriter, r *http.Request) {
|
func (imh *manifestHandler) DeleteManifest(w http.ResponseWriter, r *http.Request) {
|
||||||
dcontext.GetLogger(imh).Debug("DeleteImageManifest")
|
dcontext.GetLogger(imh).Debug("DeleteImageManifest")
|
||||||
|
|
||||||
|
if imh.Tag != "" {
|
||||||
|
imh.Errors = append(imh.Errors, errcode.ErrorCodeUnsupported)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
manifests, err := imh.Repository.Manifests(imh)
|
manifests, err := imh.Repository.Manifests(imh)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
imh.Errors = append(imh.Errors, err)
|
imh.Errors = append(imh.Errors, err)
|
||||||
|
|
Loading…
Reference in a new issue