From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id BF7373852741 for ; Tue, 6 Sep 2022 16:05:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BF7373852741 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662480352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=btR6JuNIisoI1fMOlJH6UrkgI9uA2T/sfuHGGGoC9nA=; b=VDl9xxqSwj9rwKzfl7TsBeWVz6lX9XqYEp/ru0GkzecRkZ0KLHoj9eWMJqvs3kjvsOzuus 6wPTp2bMnoS2QeMooUY7XF0TlxqoGoiwPoyxItzwHHna3sGHbxvOOkbgp13RBIFO+djMgZ evRqMVhMSy+P8a07hrqutZm4fnqyrow= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-627-ZRG-BLRuN1Sls1UMfAz5ng-1; Tue, 06 Sep 2022 12:05:49 -0400 X-MC-Unique: ZRG-BLRuN1Sls1UMfAz5ng-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F0E20811E81; Tue, 6 Sep 2022 16:05:48 +0000 (UTC) Received: from redhat.com (unknown [10.2.17.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1CA82026D4C; Tue, 6 Sep 2022 16:05:48 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.94.2) (envelope-from ) id 1oVb59-0005FJ-No; Tue, 06 Sep 2022 12:05:47 -0400 Date: Tue, 6 Sep 2022 12:05:47 -0400 From: "Frank Ch. Eigler" To: Mark Wielaard Cc: elfutils-devel@sourceware.org Subject: Re: [patch git] PR28284 - debuginfod x-debuginfod* header processing Message-ID: <20220906160547.GE13250@redhat.com> References: <20220903001304.GA20286@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi - Thanks for giving it a look. > > I had a bit of time to tweak Noah Sanci's PR28284 work, and I believe > > it addresses Mark's last set of comments (from a while ago). This > > follow-up patch corrects things like case sensitivity, spacing, \r\n > > processing, and tweaks documentation. > > I hadn't thought about the \r\n at the end of the HTTP headers. Thanks. > I assume \r\n at the end of HTTP headers required, since you are > expecting in the code now, or could it also be \n on its own? At the wire protocol level, yes, required. But this code strips them from the normal C/userspace processing (and libcurl adds them back as needed). > > The gist of it is to add a new client api function > > debuginfod_get_headers(), documented to return x-debuginfod* headers > > from current or previous fetch requests. > > 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. > > debuginfod-find prints those > > in -v verbose mode, and debuginfod relays them in federation. > > This is the only thing I am not 100% happy about. It means you can only > see the headers using debuginfod-find but no longer with any other > client when DEBUGINFOD_VERBOSE is set. Is this really what we want? Well, dunno, can't speak for we all. :-) For debugging purposes (which is what DEBUGINFOD_VERBOSE is), we could print all headers that come in, from any server we're connecting to. For API / human-friendly use, limiting to x-debuginfod* ones from the winning server seems more useful. (I hope we don't have to rethink again once the signature contents start coming down that pipe too - hope they're not too long.) Will add a commit to that effect shortly and run it through the trybots. - FChE