about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJérôme Petazzoni <jerome.petazzoni@gmail.com>2021-10-04T17·08+0200
committerVincent Ambo <mail@tazj.in>2021-10-08T10·44+0300
commitdd778e77665f41f9aa9ad75d34bdf0b0d0dc6953 (patch)
tree8d9ad0cf4dc457e71c1b141ef579d40a46a036c2
parentaf337010e964671e2f8568a0167a4f8f9eb08216 (diff)
revert: "feat(storage): Add generic support for content-types"
This reverts commit 7db252f36a68d875429a25e06d88fbfc804d84fd.

Superseded by the implementation in #127.
-rw-r--r--tools/nixery/main.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/tools/nixery/main.go b/tools/nixery/main.go
index 6af4636e51a0..d94d51b4681e 100644
--- a/tools/nixery/main.go
+++ b/tools/nixery/main.go
@@ -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{