diff --git a/registry/registry.go b/registry/registry.go index d0ddedb7ba..c570e7b73e 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -389,7 +389,7 @@ func (r *Registry) PushImageChecksumRegistry(imgData *ImgData, registry string, } setTokenAuth(req, token) req.Header.Set("X-Docker-Checksum", imgData.Checksum) - req.Header.Set("X-Docker-Checksum-Payload", imgData.checksumPayload) + req.Header.Set("X-Docker-Checksum-Payload", imgData.ChecksumPayload) res, err := doWithCookies(r.client, req) if err != nil { @@ -679,8 +679,8 @@ type RepositoryData struct { type ImgData struct { ID string `json:"id"` Checksum string `json:"checksum,omitempty"` + ChecksumPayload string `json:"-"` Tag string `json:",omitempty"` - checksumPayload string } type Registry struct { diff --git a/server.go b/server.go index 01adcc30eb..b9fd92716a 100644 --- a/server.go +++ b/server.go @@ -1509,7 +1509,7 @@ func (srv *Server) pushImage(r *registry.Registry, out io.Writer, remote, imgID, return "", err } imgData.Checksum = checksum - imgData.checksumPayload = checksumPayload + imgData.ChecksumPayload = checksumPayload // Send the checksum if err := r.PushImageChecksumRegistry(imgData, ep, token); err != nil { return "", err