diff --git a/http/download.go b/http/download.go index 24be26ff..3c2a1ebd 100644 --- a/http/download.go +++ b/http/download.go @@ -111,6 +111,10 @@ func (downloader *downloaderImpl) GetLength(ctx context.Context, url string) (in } if resp.ContentLength < 0 { + // an existing, but zero-length file can be reported with ContentLength -1 + if resp.StatusCode == 200 && resp.ContentLength == -1 { + return 0, nil + } return -1, fmt.Errorf("could not determine length of %s", url) }