]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod-client.c: Don't print empty line in header_callback
authorAaron Merey <amerey@redhat.com>
Wed, 1 Nov 2023 21:40:12 +0000 (17:40 -0400)
committerAaron Merey <amerey@redhat.com>
Wed, 1 Nov 2023 23:29:22 +0000 (19:29 -0400)
commit0999fca6431594d49d5eceb5cd9eba685cdf1305
tree65679d3db706d6fc9a93fc19a8d8baddcef4302b
parenta34c5faad861efdd26d1c52b4f8d9d4077e03131
debuginfod-client.c: Don't print empty line in header_callback

libcurl passes an empty line to header_callback indicating the end
of the response's HTTP headers.

Currently this empty line is printed to the debuginfod_client's
verbose_fd with a "header" prefix:

    $ echo $DEBUGINFOD_URLS
    https://debuginfod.fedoraproject.org/
    $ debuginfod-find -vv debuginfo e2bbf033b548021c37866429f12a99bd33bd6e8d
    [...]
    header x-fedora-requestid: ZULLx0PPA8nmj8c8Hw-RtAACgAE
    header server: Apache
    header
    [...]

Prevent this unnecessary line of output by only printing non-empty
lines in header_callback.

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