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
@ -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 New Issue
Block a user