revert: "feat(storage): Add generic support for content-types"

This reverts commit 7db252f36a.

Superseded by the implementation in #127.
This commit is contained in:
Jérôme Petazzoni 2021-10-04 19:08:25 +02:00 committed by Vincent Ambo
parent 6c4a69fa42
commit 1231589279

10
main.go
View File

@ -195,16 +195,6 @@ func (h *registryHandler) serveManifestTag(w http.ResponseWriter, r *http.Reques
// serveBlob serves a blob from storage by digest
func (h *registryHandler) serveBlob(w http.ResponseWriter, r *http.Request, blobType, digest string) {
storage := h.state.Storage
switch blobType {
case "manifests":
// It is necessary to set the correct content-type when serving manifests.
// Otherwise, you may get the following mysterious error message when pulling:
// "Error response from daemon: missing signature key"
w.Header().Add("Content-Type", mf.ManifestType)
case "blobs":
// It is not strictly necessary to set this content-type, but since we're here...
w.Header().Add("Content-Type", mf.LayerType)
}
err := storage.Serve(digest, r, w)
if err != nil {
log.WithError(err).WithFields(log.Fields{