Commit 24d459f
committed
Ignore size value from GetBlob
The internal API in containers/image returns a size...which
is an `int64` in the source probably because OCI Descriptor
type have it be an int64 too for bad historical reasons;
xref opencontainers/image-spec#153
Anyways, the `GetBlob` wrapper API returns `-1` when
the remote registry doesn't emit `Content-Length`:
https://github.com/containers/container-libs/blob/3af9abd27f3b875122b9fedd88953e8c840d6958/image/docker/docker_client.go#L1068
And this apparently happens with at least the Quay
mirror registry.
We also noticed this problem when adding `GetRawBlob`
in containers/skopeo#2601
which simply doesn't return a size to the client at all.
Signed-off-by: Colin Walters <[email protected]>1 parent 3b2bc1d commit 24d459f
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
650 | 654 | | |
651 | | - | |
652 | 655 | | |
653 | 656 | | |
654 | 657 | | |
| |||
0 commit comments