Relax requirement for size argument during blob upload

During client implementation, it was found that requiring the size argument
made client implementation more complex. The original benefit of the size
argument was to provide an additional check alongside of tarsum to validate
incoming data. For the purposes of the registry, it has been determined that
tarsum should be enough to validate incoming content.

At this time, the size check is optional but we may consider removing it
completely.
This commit is contained in:
Stephen J Day 2014-12-12 17:43:30 -08:00
parent 8fd47c1c18
commit a4f42b8eea
4 changed files with 54 additions and 19 deletions

View file

@ -460,7 +460,10 @@ func pushLayer(t *testing.T, ub *v2.URLBuilder, name string, dgst digest.Digest,
u.RawQuery = url.Values{
"digest": []string{dgst.String()},
"size": []string{fmt.Sprint(rsLength)},
// TODO(stevvooe): Layer upload can be completed with and without size
// argument. We'll need to add a test that checks the latter path.
"size": []string{fmt.Sprint(rsLength)},
}.Encode()
uploadURL := u.String()