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:
Sam Alba 2014-03-31 18:31:15 -07:00
parent d2b2bf0393
commit 4f29181d9b

View file

@ -437,8 +437,10 @@ func (r *Registry) PushImageLayerRegistry(imgID string, layer io.Reader, registr
utils.Debugf("[registry] Calling PUT %s", registry+"images/"+imgID+"/layer")
h := sha256.New()
tarsumLayer := &utils.TarSum{Reader: layer}
h := sha256.New()
h.Write(jsonRaw)
h.Write([]byte{'\n'})
checksumLayer := &utils.CheckSum{Reader: tarsumLayer, Hash: h}
req, err := r.reqFactory.NewRequest("PUT", registry+"images/"+imgID+"/layer", checksumLayer)