helm: relax Content-Type checks

OCI registries are moving towards a more generic artifact storage
mechanism. In short-term, at the very least support helm charts.
This commit is contained in:
Ramkumar Chinchani
2020-05-19 16:53:05 -07:00
parent 6017be5bfd
commit e83999ae0d
3 changed files with 3 additions and 11 deletions
-9
View File
@@ -957,11 +957,6 @@ func (rh *RouteHandler) UpdateBlobUpload(w http.ResponseWriter, r *http.Request)
return
}
if r.Header.Get("Content-Type") != BinaryMediaType {
w.WriteHeader(http.StatusUnsupportedMediaType)
return
}
_, err = rh.c.ImageStore.PutBlobChunk(name, sessionID, from, to, r.Body)
if err != nil {
switch err {
@@ -984,10 +979,6 @@ func (rh *RouteHandler) UpdateBlobUpload(w http.ResponseWriter, r *http.Request)
}
finish:
if r.Header.Get("Content-Type") != BinaryMediaType {
w.WriteHeader(http.StatusUnsupportedMediaType)
return
}
// blob chunks already transferred, just finish
if err := rh.c.ImageStore.FinishBlobUpload(name, sessionID, r.Body, digest); err != nil {
switch err {