From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by sourceware.org (Postfix) with ESMTP id 53F31385E006 for ; Thu, 26 Mar 2020 15:15:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 53F31385E006 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-214-e5-KXgn-MgOsaFMJK-iSRQ-1; Thu, 26 Mar 2020 11:15:31 -0400 X-MC-Unique: e5-KXgn-MgOsaFMJK-iSRQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 334AE86A062 for ; Thu, 26 Mar 2020 15:15:30 +0000 (UTC) Received: from redhat.com (ovpn-112-40.phx2.redhat.com [10.3.112.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13C6519C70 for ; Thu, 26 Mar 2020 15:15:30 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.92.3) (envelope-from ) id 1jHUEC-0003eI-UT for elfutils-devel@sourceware.org; Thu, 26 Mar 2020 11:15:28 -0400 Date: Thu, 26 Mar 2020 11:15:28 -0400 From: "Frank Ch. Eigler" To: elfutils-devel@sourceware.org Subject: PR25548 followup Message-ID: <20200326151528.GC13051@redhat.com> MIME-Version: 1.0 User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, score=-30.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 15:15:34 -0000 Hi - pushed as obvious: Author: Frank Ch. Eigler Date: Thu Mar 26 11:12:49 2020 -0400 PR25548: CURLOPT_PATH_AS_IS backward compatibility =20 libcurl < 7.42 lacks the CURLOPT_PATH_AS_IS flag, but extraneous client-side canonicalization is mostly harmless. =20 Signed-off-by: Frank Ch. Eigler Reported-by: Mark Wielaard diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 7518e886031c..60d912a37c47 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,8 @@ +2020-03-26 Frank Ch. Eigler + +=09* debuginfod-client.c (debuginfod_query_server): Don't +=09set CURLOPT_PATH_AS_IS on old curl. Mostly harmless. + 2020-03-24 Frank Ch. Eigler =20 =09* debuginfod-client.c (debuginfod_query_server): Set diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.= c index 251047caf53f..f1b63160a5f2 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -716,7 +716,12 @@ debuginfod_query_server (debuginfod_client *c, curl_easy_setopt(data[i].handle, CURLOPT_FOLLOWLOCATION, (long) 1); curl_easy_setopt(data[i].handle, CURLOPT_FAILONERROR, (long) 1); curl_easy_setopt(data[i].handle, CURLOPT_NOSIGNAL, (long) 1); +#if CURL_AT_LEAST_VERSION(7,42,0) curl_easy_setopt(data[i].handle, CURLOPT_PATH_AS_IS, (long) 1); +#else + /* On old curl; no big deal, canonicalization here is almost the + same, except perhaps for ? # type decorations at the tail. */ +#endif curl_easy_setopt(data[i].handle, CURLOPT_AUTOREFERER, (long) 1); curl_easy_setopt(data[i].handle, CURLOPT_ACCEPT_ENCODING, ""); add_extra_headers(data[i].handle);