On Thu, Mar 30, 2023 at 01:24:13PM -0400, Frank Ch. Eigler wrote:
> > The written_size is actual file size (uncompressed), but IIUC
> > Content-Length is the compressed size if Content-Encoding says the
> > content is compressed. I haven't seen any compressed responses with
> > Content-Length, but
On Wed, Mar 29, 2023 at 03:14:43PM -0400, Frank Ch. Eigler wrote:
> Hi -
>
> > x-debuginfod-size is the actual file size, but CURLINFO_SIZE_DOWNLOAD_T
> > is transferred size, i.e. the gzipped one if gzip is on.
> > Let's count written data and use that if and only if x-debuginfod-size
> > is used
On Wed, Mar 29, 2023 at 10:57:47PM +0800, lilydjwg wrote:
> On Wed, Mar 29, 2023 at 08:28:35AM -0400, Frank Ch. Eigler wrote:
> > Hi -
> >
> > > [...]
> > > The reason is that when Content-Length is unavailable, cl is set to -1
> > > by curl
> >
> > Is that behaviour from new versions of curl?
>
x-debuginfod-size is the actual file size, but CURLINFO_SIZE_DOWNLOAD_T
is transferred size, i.e. the gzipped one if gzip is on.
Let's count written data and use that if and only if x-debuginfod-size
is used.
Signed-off-by: lilydjwg
---
ChangeLog | 2 ++
debuginfod/debugin
Signed-off-by: lilydjwg
---
ChangeLog | 5 +
debuginfod/debuginfod-client.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 10c23002..05697a02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-29 lilydj
On Wed, Mar 29, 2023 at 08:28:35AM -0400, Frank Ch. Eigler wrote:
> Hi -
>
> > [...]
> > The reason is that when Content-Length is unavailable, cl is set to -1
> > by curl
>
> Is that behaviour from new versions of curl?
Yes. curl 8.0.1 to be exact.
> > but dl_size remains as 0, but later dl_s
From: lilydjwg
Currently when the debuginfod server doesn't set Content-Length but set
x-debuginfod-size header, it's ignored and the progressfn doesn't know
the total size.
This happens for me with Arch Linux's debuginfod server and gdb.
The reason is that when Content-Length is unavailable, c