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. > > Hey, great idea actually tallying up writes in the callback function. > (We need to take care to clear that counter, in case of client object > reuse.) Also, can you think of some reason not to just use that value > at all times, i.e., without any of that "if and only if ..." business?
The counter is in handle_data, and it is already cleared at "query_in_parallel:". I don't find other places that may reuse them. 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 from the spec I don't read they are not allowed. -- Best regards, lilydjwg