debuginfod: Use the debuginfod-size response header
authorAaron Merey <amerey@redhat.com>
Wed, 12 Jan 2022 03:07:55 +0000 (22:07 -0500)
committerAaron Merey <amerey@redhat.com>
Mon, 25 Apr 2022 14:58:37 +0000 (10:58 -0400)
commit55fee962676fbff60c6b0469305bcb077910d64f
tree2efb640ddb38e616a974e3df35570c06158ffad9
parent62963dfc4835405a00463f24e79796c622cc2c84
debuginfod: Use the debuginfod-size response header

In some cases the content-length header may not be available in order
to pass to a progressfn.  If content-length isn't available then attempt
to get the size of the download from the debuginfod-size header instead.

It should be mentioned that if a compressed file (ex. gzip) is being
transferred, the actual transfer length will be less than debuginfod-size.
In this case debuginfod-size is a best-guess upper bound on the size of
the transfer.

Signed-off-by: Aaron Merey <amerey@redhat.com>
debuginfod/debuginfod-client.c