diff --git a/zuul_registry/main.py b/zuul_registry/main.py index 7835592..ccb324d 100644 --- a/zuul_registry/main.py +++ b/zuul_registry/main.py @@ -271,7 +271,8 @@ class RegistryAPI: orig_repository, uuid) res.headers['Docker-Upload-UUID'] = uuid res.headers['Content-Length'] = '0' - res.headers['Range'] = '0-%s' % (new_length,) + # Be careful to not be off-by-one, range starts at 0 + res.headers['Range'] = '0-%s' % (new_length - 1,) res.status = '202 Accepted' self.log.info( '[u: %s] Finish Upload chunk %s %s', uuid, repository, new_length)