app/imageoper, app/maindb: one image - one arch; app/storage: blob to name subdir
This commit is contained in:
@@ -21,7 +21,7 @@ func (hand *Handler) ManifestExists(rctx *router.Context) {
|
||||
name, _ := rctx.GetSubpath("name")
|
||||
reference, _ := rctx.GetSubpath("reference")
|
||||
|
||||
//hand.DumpHeaders("ManigestExists:\n", rctx)
|
||||
hand.DumpHeaders("ManigestExists:\n", rctx)
|
||||
|
||||
params := &imageoper.ManifestExistsParams{
|
||||
Name: name,
|
||||
@@ -48,6 +48,8 @@ func (hand *Handler) ManifestExists(rctx *router.Context) {
|
||||
rctx.SetHeader("Content-Type", res.ContentType)
|
||||
rctx.SetHeader("Docker-Content-Digest", res.DockerContentDigest)
|
||||
}
|
||||
hand.logg.Debugf(res.ContentType)
|
||||
hand.logg.Debugf(res.DockerContentDigest)
|
||||
rctx.SetStatus(code)
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
//"net/http"
|
||||
|
||||
"mstore/app/imageoper"
|
||||
"mstore/app/router"
|
||||
@@ -21,12 +21,14 @@ func (hand *Handler) GetVersion(rctx *router.Context) {
|
||||
params := &imageoper.GetVersionParams{}
|
||||
|
||||
//hand.DumpHeaders("GetVersion", rctx)
|
||||
authorization := rctx.GetHeader("Authorization")
|
||||
if authorization == "" {
|
||||
rctx.SetHeader("WWW-Authenticate", `Basic realm="mstore"`)
|
||||
rctx.SetStatus(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
/*
|
||||
authorization := rctx.GetHeader("Authorization")
|
||||
if authorization == "" {
|
||||
rctx.SetHeader("WWW-Authenticate", `Basic realm="mstore"`)
|
||||
rctx.SetStatus(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
*/
|
||||
ctx := rctx.GetContext()
|
||||
_, code, err := hand.imop.GetVersion(ctx, params)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user