Do not assume Content-Length header is always available

The Content-Length header cannot always be available, for example when
the transfer encoding is chunked.

Recently downloading the gzip'd pgo_training-1.ii has been failing
locally due to this.

Bug: 1324691
Change-Id: I37a1ae5c1ce4727b547d4da9544bb4d037d33835
Reviewed-by: Hans Wennborg <>
Reviewed-by: Nico Weber <>
Commit-Queue: Arthur Eubanks <>
Cr-Commit-Position: refs/heads/main@{#1003356}
GitOrigin-RevId: 3501c0afd415c16d549bf4ebc5a1c4f5953a1a88
1 file changed