forked from TrueCloudLab/distribution
Inverted layer checksum and tarsum.
The checksum of the payload has to be computed on the Gzip'ed content. Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
This commit is contained in:
parent
50ec0bbd4e
commit
d2b2bf0393
1 changed files with 3 additions and 3 deletions
|
@ -438,10 +438,10 @@ func (r *Registry) PushImageLayerRegistry(imgID string, layer io.Reader, registr
|
|||
utils.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
|
||||
|
||||
h := sha256.New()
|
||||
checksumLayer := &utils.CheckSum{Reader: layer, Hash: h}
|
||||
tarsumLayer := &utils.TarSum{Reader: checksumLayer}
|
||||
tarsumLayer := &utils.TarSum{Reader: layer}
|
||||
checksumLayer := &utils.CheckSum{Reader: tarsumLayer, Hash: h}
|
||||
|
||||
req, err := r.reqFactory.NewRequest("PUT", registry+"images/"+imgID+"/layer", tarsumLayer)
|
||||
req, err := r.reqFactory.NewRequest("PUT", registry+"images/"+imgID+"/layer", checksumLayer)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue