opencontainers / distribution-spec

OCI Distribution Specification
https://opencontainers.org
Apache License 2.0
792 stars 199 forks source link

Allow Content-Length to be omitted when pushing on patch requests #404

Open z4ce opened 1 year ago

z4ce commented 1 year ago

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

z4ce commented 1 year ago

I think there should be further discussion if the POST+PUT method should also be modified to allow chunked encoding, but I wanted introduce this independently as it updates the specification to reflect the current real-world usage by the docker cli.