Skip to content

Conversation

@zhouhao3
Copy link

@zhouhao3 zhouhao3 commented Feb 7, 2017

Layer has several mediatype types, it should be completed all the mediatype.

Signed-off-by: zhouhao [email protected]

mediatype = v1.MediaTypeImageLayerNonDistributableGzip
}

if err := d.validate(w, []string{mediatype}); err != nil {
Copy link
Member

@runcom runcom Feb 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you just pass d.MediaType here? The rest seems redundant

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh,Why do you think so?d.mediatype is the layer mediatype, according to the different mediatype to verify different, what is the problem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I meant the actual media types as slice

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this code is wrong -- it will ignore invalid images.

I'd recommend closing this for #111.

@vbatts
Copy link
Member

vbatts commented Feb 8, 2017

Closing in favor of #111

@vbatts vbatts closed this Feb 8, 2017
@zhouhao3 zhouhao3 deleted the layers-tar branch February 10, 2017 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants