Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

z4ce
Copy link

@z4ce z4ce commented Apr 25, 2023

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

@z4ce
Copy link
Author

z4ce commented Apr 25, 2023

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.

@z4ce z4ce changed the title Allow Content-Length to omitted when pushing on patch requests Allow Content-Length to be omitted when pushing on patch requests Apr 25, 2023
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 <[email protected]>
@sudo-bmitch sudo-bmitch added this to the v1.1.0 milestone May 4, 2023
Copy link
Contributor

@sudo-bmitch sudo-bmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens to the Content-Range when the length is unknown?

spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
Signed-off-by: Josh Dolitsky <[email protected]>
Copy link
Member

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropping from 1.1 milestone

@jdolitsky jdolitsky removed this from the v1.1.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants