Hi Frank, On Tue, 2022-09-06 at 12:05 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > > This looks good, but I think c->winning_headers needs to be > > freed/cleared at the start of debuginfod_query_server. Otherwise if you > > reuse the debuginfod_client and you hit the cache, the user gets the > > headers from the last use of debuginfod_client that did fetch something > > from a server. Which imho is confusing (the headers won't match the > > cached result returned). > > Good point, we don't want an aborted new transfer to retain records > from a previous run, will fix that.
Not just a new transfer, but also when we hit the cache before doing a new transfer. Currently when we hit the cache and don't do any transfer the winning_headers will point to the last http transfer which will have nothing to do with the returned (cached) result. Just like we clear client->url early. Thanks, Mark