mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Payload checksum now match the checksum simple
Backported for backward compatibility. Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
This commit is contained in:
parent
3f0886c8c3
commit
de9fba7172
1 changed files with 3 additions and 1 deletions
|
@ -437,8 +437,10 @@ func (r *Registry) PushImageLayerRegistry(imgID string, layer io.Reader, registr
|
||||||
|
|
||||||
utils.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
|
utils.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
|
||||||
|
|
||||||
h := sha256.New()
|
|
||||||
tarsumLayer := &utils.TarSum{Reader: layer}
|
tarsumLayer := &utils.TarSum{Reader: layer}
|
||||||
|
h := sha256.New()
|
||||||
|
h.Write(jsonRaw)
|
||||||
|
h.Write([]byte{'\n'})
|
||||||
checksumLayer := &utils.CheckSum{Reader: tarsumLayer, Hash: h}
|
checksumLayer := &utils.CheckSum{Reader: tarsumLayer, Hash: h}
|
||||||
|
|
||||||
req, err := r.reqFactory.NewRequest("PUT", registry+"images/"+imgID+"/layer", checksumLayer)
|
req, err := r.reqFactory.NewRequest("PUT", registry+"images/"+imgID+"/layer", checksumLayer)
|
||||||
|
|
Loading…
Add table
Reference in a new issue