distribution/api/v2
Stephen J Day 0270bec916 Handle empty blob files more appropriately
Several API tests were added to ensure correct acceptance of zero-size and
empty tar files. This led to several changes in the storage backend around the
guarantees of remote file reading, which backs the layer and layer upload type.

In support of these changes, zero-length and empty checks have been added to
the digest package. These provide a sanity check against upstream tarsum
changes. The fileReader has been modified to be more robust when reading and
seeking on zero-length or non-existent files. The file no longer needs to exist
for the reader to be created. Seeks can now move beyond the end of the file,
causing reads to issue an io.EOF. This eliminates errors during certain race
conditions for reading files which should be detected by stat calls. As a part
of this, a few error types were factored out and the read buffer size was
increased to something more reasonable.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-02 13:01:49 -08:00
..
descriptors.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
doc.go Merge errors and urls package into unified v2 package 2014-12-12 15:36:15 -08:00
errors.go Add blob upload invalid error code 2015-01-02 10:49:10 -08:00
errors_test.go Move from docker-registry to distribution 2014-12-23 17:13:02 -08:00
names.go Move names regular expressions to api/v2 packages 2015-01-05 16:44:03 -08:00
names_test.go Move names regular expressions to api/v2 packages 2015-01-05 16:44:03 -08:00
routes.go Automatically generate V2 API specification 2014-12-18 21:29:56 -08:00
routes_test.go Automatically generate V2 API specification 2014-12-18 21:29:56 -08:00
urls.go Move from docker-registry to distribution 2014-12-23 17:13:02 -08:00
urls_test.go Add tests for URLBuilder 2014-12-12 15:48:41 -08:00