working commit

This commit is contained in:
2026-03-01 21:35:40 +02:00
parent 86c7831cd8
commit 32c9cc26fc
3 changed files with 20 additions and 2 deletions
+5
View File
@@ -3,6 +3,7 @@ package repocli
import (
"bytes"
"context"
"errors"
"fmt"
"net/http"
"strconv"
@@ -41,6 +42,10 @@ func (cli *Client) GetManifest(ctx context.Context, rawrepo, tag string) (bool,
return exist, mime, man, err
}
contentLength := resp.Header.Get("Content-Length")
if contentLength == "" {
err = errors.New("Empty Content-Length header")
return exist, mime, man, err
}
manSize, err := strconv.ParseInt(contentLength, 10, 64)
if err != nil {
return exist, mime, man, err