diff --git a/Makefile b/Makefile index da9ad9b3..b0fdc07d 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ conformance-test: conformance-binary: $(OUTPUT_DIRNAME)/conformance.test -TEST_REGISTRY_CONTAINER ?= ghcr.io/project-zot/zot-minimal-linux-amd64:v2.0.4@sha256:0312c23d9658b912a0d4db5c6ecd6d4391c1211912f10de3e9a52685f000318a +TEST_REGISTRY_CONTAINER ?= ghcr.io/project-zot/zot-minimal-linux-amd64:v2.1.7@sha256:2114797f00696011f38cc94c72f5773c84b1036562df5034d05ea19075179ad1 registry-ci: docker rm -f oci-conformance && \ mkdir -p $(OUTPUT_DIRNAME) && \ diff --git a/conformance/02_push_test.go b/conformance/02_push_test.go index 13845386..09a81f90 100644 --- a/conformance/02_push_test.go +++ b/conformance/02_push_test.go @@ -237,6 +237,7 @@ var test02Push = func() { Expect(err).To(BeNil()) location := resp.Header().Get("Location") Expect(resp.StatusCode()).To(Equal(http.StatusAccepted)) + Expect(resp.Header().Get("Range")).To(Equal(fmt.Sprintf("0-%d", len(testBlobB)-1))) Expect(location).ToNot(BeEmpty()) lastResponse = resp }) diff --git a/spec.md b/spec.md index ad364d32..e60ce813 100644 --- a/spec.md +++ b/spec.md @@ -368,7 +368,7 @@ The `` is the content-length, in bytes, of the current chunk. If the registry provides an `OCI-Chunk-Min-Length` header in the `POST` response, the size of each chunk, except for the final chunk, SHOULD be greater or equal to that value. The final chunk MAY have any length. -Each successful chunk upload MUST have a `202 Accepted` response code, and MUST have the following headers: +The response for each successful chunk upload MUST be `202 Accepted`, and MUST have the following headers: ``` Location: @@ -377,7 +377,7 @@ Range: 0- Each consecutive chunk upload SHOULD use the `` provided in the response to the previous chunk upload. -The `` value is the position of the last uploaded byte. +The `` value is the position of the last uploaded byte of the blob, matching the end value of the `Content-Range` in the request. Chunks MUST be uploaded in order, with the first byte of a chunk being the last chunk's `` plus one. If a chunk is uploaded out of order, the registry MUST respond with a `416 Requested Range Not Satisfiable` code. @@ -424,7 +424,7 @@ Range: 0- The following chunk upload SHOULD use the `` provided in the response. -The `` value is the position of the last uploaded byte. +The `` value is the position of the last uploaded byte of the blob. ##### Mounting a blob from another repository