Skip to content

Commit

Permalink
revert: "feat(storage): Add generic support for content-types"
Browse files Browse the repository at this point in the history
This reverts commit 7db252f.

Superseded by the implementation in #127.
  • Loading branch information
jpetazzo authored and tazjin committed Oct 8, 2021
1 parent 6c4a69f commit 1231589
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 1231589

Please sign in to comment.