Skip to content

Commit

Permalink
Allow Content-Length to be omitted when pushing on patch requests
Browse files Browse the repository at this point in the history
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: containerd/containerd#7459

Signed-off-by: Ian Zink <ian@replicated.com>
  • Loading branch information
Ian Zink committed Apr 25, 2023
1 parent c3e48b9 commit b799106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ OCI-Chunk-Min-Length: <size>
Please reference the above section for restrictions on the `<location>`.

---
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: `<location>` <sup>[end-5](#endpoints)</sup>
```
Expand Down

0 comments on commit b799106

Please sign in to comment.