public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org
Subject: Re: [patch git] PR28284 - debuginfod x-debuginfod* header processing
Date: Thu, 8 Sep 2022 09:45:24 -0400	[thread overview]
Message-ID: <20220908134524.GA30853@redhat.com> (raw)
In-Reply-To: <3bae0b842ff7b23865ec2bca2b24171c89369764.camel@klomp.org>

Hi -

> > 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.

Got it, pushing this:

diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 272a6a7a007f..5e5c140ab205 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -588,9 +588,11 @@ debuginfod_query_server (debuginfod_client *c,
       goto out;
     }
 
-  /* Clear the obsolete URL from a previous _find operation. */
+  /* Clear the obsolete data from a previous _find operation. */
   free (c->url);
   c->url = NULL;
+  free (c->winning_headers);
+  c->winning_headers = NULL;
 
   /* PR 27982: Add max size if DEBUGINFOD_MAXSIZE is set. */
   long maxsize = 0;

- FChE


      reply	other threads:[~2022-09-08 13:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03  0:13 Frank Ch. Eigler
2022-09-06 15:49 ` Mark Wielaard
2022-09-06 16:05   ` Frank Ch. Eigler
2022-09-06 16:42     ` Ryan Goldberg
2022-09-08 11:42     ` Mark Wielaard
2022-09-08 13:45       ` Frank Ch. Eigler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220908134524.GA30853@redhat.com \
    --to=fche@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).