diff --git a/README.md b/README.md index 73aab0f0..584bbff3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# zot [![Build Status](https://travis-ci.org/anuvu/zot.svg?branch=master)](https://travis-ci.org/anuvu/zot) [![codecov.io](http://codecov.io/github/anuvu/zot/coverage.svg?branch=master)](http://codecov.io/github/anuvu/zot?branch=master) +# zot [![Build Status](https://travis-ci.org/anuvu/zot.svg?branch=master)](https://travis-ci.org/anuvu/zot) [![codecov.io](http://codecov.io/github/anuvu/zot/coverage.svg?branch=master)](http://codecov.io/github/anuvu/zot?branch=master) [![Conformance Results](https://github.com/anuvu/zot/workflows/conformance/badge.svg)](https://github.com/anuvu/zot/actions?query=workflow%3Aconformance) **zot** is a vendor-neutral OCI image repository server purely based on [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec). @@ -6,7 +6,7 @@ https://anuvu.github.io/zot/ # Features -* Conforms to [OCI distribution spec](https://github.com/opencontainers/distribution-spec) APIs [![zot](https://github.com/opencontainers/oci-conformance/workflows/zot-1/badge.svg)](https://github.com/opencontainers/oci-conformance/tree/master/distribution-spec#anuvu/zot) +* Conforms to [OCI distribution spec](https://github.com/opencontainers/distribution-spec) APIs * Uses [OCI image layout](https://github.com/opencontainers/image-spec/blob/master/image-layout.md) for image storage * Supports [helm charts](https://helm.sh/docs/topics/registries/) * Currently suitable for on-prem deployments (e.g. colocated with Kubernetes) diff --git a/pkg/api/routes.go b/pkg/api/routes.go index 99817cdb..f2410699 100644 --- a/pkg/api/routes.go +++ b/pkg/api/routes.go @@ -906,6 +906,7 @@ func (rh *RouteHandler) UpdateBlobUpload(w http.ResponseWriter, r *http.Request) rh.c.Log.Info().Int64("r.ContentLength", r.ContentLength).Msg("DEBUG") contentPresent := true + contentLen, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) if err != nil { @@ -1067,6 +1068,7 @@ func (rh *RouteHandler) ListRepositories(w http.ResponseWriter, r *http.Request) func getContentRange(r *http.Request) (int64 /* from */, int64 /* to */, error) { contentRange := r.Header.Get("Content-Range") tokens := strings.Split(contentRange, "-") + from, err := strconv.ParseInt(tokens[0], 10, 64) if err != nil {