add version

This commit is contained in:
Michael Yang
2023-08-21 18:24:42 -07:00
parent 0a892419ad
commit 2c7f956b38
7 changed files with 47 additions and 36 deletions

View File

@@ -156,9 +156,9 @@ func doDownload(ctx context.Context, opts downloadOpts, f *FileDownload) error {
}
url := fmt.Sprintf("%s/v2/%s/blobs/%s", opts.mp.Registry, opts.mp.GetNamespaceRepository(), f.Digest)
headers := map[string]string{
"Range": fmt.Sprintf("bytes=%d-", size),
}
headers := make(http.Header)
headers.Set("Range", fmt.Sprintf("bytes=%d-", size))
resp, err := makeRequest(ctx, "GET", url, headers, nil, opts.regOpts)
if err != nil {