Content-Length 随机为空

Sup*_*JMN 5 .net c# http httpclient http-headers

我正在尝试使用以下代码从特定 URL 下载:

var requestUri = "https://github.com/gus33000/MSM8994-8992-NT-ARM64-Drivers/archive/master.zip";

using (var client = new HttpClient())
{
    using (var response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead))
    {
        var contentLength = response.Content.Headers.ContentLength;
    }
}
Run Code Online (Sandbox Code Playgroud)

如果您运行代码,您可能会null进入contentLength. 但为什么?有时,返回长度。我应该怎么做才能始终检索文件的长度?