working commit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user