+2023-03-29 lilydjwg <lilydjwg@gmail.com>
+
+ * debuginfod/debuginfod-client.c: Fix download size not correctly
+ fallbacks to x-debuginfod-size header
+
2023-03-03 Mark Wielaard <mark@klomp.org>
* NEWS: Add ELFCOMPRESS_ZSTD support for libelf and elfcompress.
+2023-03-29 lilydjwg <lilydjwg@gmail.com>
+
+ * debuginfod-client.c (debuginfod_query_server): Handle dl_size in
+ progress to account for possible curl 8.0.1 changes to
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD*.
+
2023-03-17 Aaron Merey <amerey@redhat.com>
* debuginfod-client.c (debuginfod_query_server): Do not create an
goto out2;
}
- long dl_size = 0;
+ long dl_size = -1;
if (target_handle && (c->progressfn || maxsize > 0))
{
/* Get size of file being downloaded. NB: If going through
curl_res = curl_easy_getinfo(target_handle,
CURLINFO_CONTENT_LENGTH_DOWNLOAD,
&cl);
- if (curl_res == CURLE_OK)
+ if (curl_res == CURLE_OK && cl >= 0)
dl_size = (cl >= (double)(LONG_MAX+1UL) ? LONG_MAX : (long)cl);
#endif
/* If Content-Length is -1, try to get the size from
}
- if ((*c->progressfn) (c, pa, dl_size))
+ if ((*c->progressfn) (c, pa, dl_size == -1 ? 0 : dl_size))
{
c->progressfn_cancel = true;
break;