cue-labs / oci

Go modules related to OCI (Open Container Initiative) registries
Apache License 2.0
23 stars 4 forks source link

ociregistry/ociclient: do not use single-post upload #12

Closed rogpeppe closed 1 year ago

rogpeppe commented 1 year ago

As outlined in this Go issue and this docker registry issue, failing over from single-post to post-then-put is problematic because we can't guarantee that the body won't be consumed.

We could implement some logic to cache the request body until the 100-continue response arrives (I have already made a PoC to verify this), but a simpler solution, if somewhat less efficient, is always to use the post-then-put method, which doesn't require that failover.