From b799106a776c5f626c586435330eba046292c4e7 Mon Sep 17 00:00:00 2001 From: Ian Zink Date: Tue, 25 Apr 2023 17:14:15 -0500 Subject: [PATCH 1/2] Allow Content-Length to be omitted when pushing on patch requests Technically due to the way the specification is written today the moby/docker cli push is nonconformant. Given that is one of the most common ways users are pushing today, the specification should recognize that it is allowed. Further, requiring `Content-Length` to be set means that no client that is conforming can use http chunked encoding, which limits the use of CDNs like CloudFlare and other reverse proxies. See further discussion at: https://github.com/containerd/containerd/pull/7459 Signed-off-by: Ian Zink --- spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.md b/spec.md index 1ea5bc5e..21e9dbbf 100644 --- a/spec.md +++ b/spec.md @@ -328,7 +328,7 @@ OCI-Chunk-Min-Length: Please reference the above section for restrictions on the ``. --- -To upload a chunk, issue a `PATCH` request to a URL path in the following format, and with the following headers and body: +To upload a chunk, issue a `PATCH` request to a URL path in the following format, and with the following headers and body. `Content-Length` can be omitted if HTTP chunked transfer encoding is used: URL path: `` [end-5](#endpoints) ``` From f40894eab83d84745a78d56f8ca1711a98e30906 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com> Date: Wed, 21 Jun 2023 12:22:24 -0500 Subject: [PATCH 2/2] Update spec.md Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com> --- spec.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec.md b/spec.md index 21e9dbbf..649ec64e 100644 --- a/spec.md +++ b/spec.md @@ -328,7 +328,8 @@ OCI-Chunk-Min-Length: Please reference the above section for restrictions on the ``. --- -To upload a chunk, issue a `PATCH` request to a URL path in the following format, and with the following headers and body. `Content-Length` can be omitted if HTTP chunked transfer encoding is used: +To upload a chunk, issue a `PATCH` request to a URL path in the following format, and with the following headers and body. +`Content-Length` can be omitted if HTTP chunked transfer encoding is used: URL path: `` [end-5](#endpoints) ```