From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8JzMHm+stGMSzwAAbAwnHQ (envelope-from ) for ; Tue, 03 Jan 2023 23:30:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iLPSHm+stGOASQAA9RJhRA (envelope-from ) for ; Tue, 03 Jan 2023 23:30:07 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2EAD02E3B8 for ; Tue, 3 Jan 2023 23:30:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCpnI-0005x1-Sx; Tue, 03 Jan 2023 17:30:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCpnH-0005vw-29 for guix-patches@gnu.org; Tue, 03 Jan 2023 17:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCpnG-0008M6-Og for guix-patches@gnu.org; Tue, 03 Jan 2023 17:30:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCpnG-00080o-D1 for guix-patches@gnu.org; Tue, 03 Jan 2023 17:30:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54836] [PATCH 1/2] http-client: Fix redirection. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Jan 2023 22:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54836 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Attila Lendvai Cc: 54836@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 54836-submit@debbugs.gnu.org id=B54836.167278498330702 (code B ref 54836); Tue, 03 Jan 2023 22:30:02 +0000 Received: (at 54836) by debbugs.gnu.org; 3 Jan 2023 22:29:43 +0000 Received: from localhost ([127.0.0.1]:46990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCpmw-0007z7-Nj for submit@debbugs.gnu.org; Tue, 03 Jan 2023 17:29:43 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:45831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCpmu-0007yr-Fz for 54836@debbugs.gnu.org; Tue, 03 Jan 2023 17:29:40 -0500 Received: by mail-qt1-f172.google.com with SMTP id h21so25715683qta.12 for <54836@debbugs.gnu.org>; Tue, 03 Jan 2023 14:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=h/D7/m4aR1Phfiz24Z4/PBoGcT5AX7MBxELLWoZLtIs=; b=cAQQBaL5+qoT1VSx8uNqC5WyV31v3fZ28GmxW+ATZeqoY7t7KSr1dtu5ZMALoCub0J hsyJTC7dsQ5dtyJqfo9cNacFKBTL5+ubAOqpi3IqA6bkm8lwgwnXawEuNuhazUWr1lrV zd5TDbLhoiuzphgf6w+E742pP6PgUdTJhfGKjAAPA5Dw+AeW+ixVOrU7FjR1dw5H91qz hBvzWa6Jbcmj6ztSVrXDolzveZYeQuCZEpkOtk7v31jlbS8lT5f9rlap2yTEafcEzwcR jbgHcvu8quhNKKfVWhMH64tPwqS4YDYMOwztl+G317bASaf9A5VrNYCVsGlmCmycaXWe gFbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=h/D7/m4aR1Phfiz24Z4/PBoGcT5AX7MBxELLWoZLtIs=; b=WYZZAUVOtYMidLyhL+XAG2pvmn+HKSS+1aWXVbNtObPUK87u19m/aZ6x8g5uXfMZcW n/rWtx1AvIy8C/ctUu4DrRanaaDQSDFAbrgNolo9tUMokJie+ZXCGtqFZTvEKTtcuiMt 5t5N0syozn3OtsJcd/d4Blyn4WCmuylnPI0IkJFkhU6y5pEOF7a1kFSsfBm344g6KWN9 KHiA8irCXMLmRkv0QtgMrKfLWz1ta+PUriFfuY65o4OOC0YaL7mZowIFVSzyKsbfHq4B k1XSEpBTJ+k++NMrfY0j2KvZ4M3Ou+M4OF1iWBFk+KeeEsv/4/NtomeTTm59XA2vMwTO opgA== X-Gm-Message-State: AFqh2kqLYuCMuk/awnw/YI0vPwvtf74zGmXeXLE/1GwPtn+Fts089Dxn MDWtD7MohYZvRoO7lvcOzRKIUVi/wKG6Jeoj X-Google-Smtp-Source: AMrXdXtpQkTAibHL4WdK0NCRuB5Q/CgBnA2pgsny2Z0pbiUHb/BjOGBTxJvjL7OGyO8pQAghqIzHIg== X-Received: by 2002:ac8:6a0e:0:b0:3a9:86c6:e27b with SMTP id t14-20020ac86a0e000000b003a986c6e27bmr54318580qtr.28.1672784974850; Tue, 03 Jan 2023 14:29:34 -0800 (PST) Received: from hurd (dsl-10-135-221.b2b2c.ca. [72.10.135.221]) by smtp.gmail.com with ESMTPSA id g1-20020a05620a40c100b006f87d28ea3asm22880300qko.54.2023.01.03.14.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 14:29:34 -0800 (PST) From: Maxim Cournoyer References: <20220410133431.30058-1-attila@lendvai.name> <20220410134114.371-1-attila@lendvai.name> <87v8vfiya2.fsf_-_@gnu.org> <8735hyjlix.fsf@gnu.org> Date: Tue, 03 Jan 2023 17:29:33 -0500 In-Reply-To: <8735hyjlix.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 27 Apr 2022 22:53:26 +0200") Message-ID: <87wn63xnea.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672785007; a=rsa-sha256; cv=none; b=t/gHaI2M03fi3HHHpEUFoCIkP97zXyXUSTRu3ShSIUnr6O/n140EAc2gxfh9WC7HNJw7lt 1E6N6TGtp40Xk2fTTH5WpjkDlaDsvLH///OpkBgeuCXPFWlM7Whtdg0dPDoKUkDZAOGV6x N+qI+6E8Ok64fbTBSyapc205rkg3OsxMfZAJGj1vg6wJHBkWrKMWYwXFPK6eN6zl218eeX B77PB2jHTEsOHb71XU1SYtBBnp0FMsm5HMyziI3y7jKK6a8APSTjVQK0gqggiY9pAVqGjU 4bIFbeDrzjCktJ74SBdg+1tmnoT3RYaFEkWH20GlMndGY9fkU3UxzGqH1kEzVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=cAQQBaL5; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672785007; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=h/D7/m4aR1Phfiz24Z4/PBoGcT5AX7MBxELLWoZLtIs=; b=BGO37liQhluYuInwfuZfE5DlxoFSLheQd+K/YYlCpz3B70TURUT5VE/UYn+FYb5KwyQv6G Ulhs7HtKSRkslXcRUPXm3yrey7Z6fJJzdTZEXatoIJv/XsLyOjL3Q5e/XMXuTDHavmmmv2 dROum7ZzbcpBLu1BJiY13h8aBTChgkYW0gSGRaxWRUOcjqZKTClOedMydBqfCfc8JwBEsY xDGUNvJqJSOQyaH4W6xTlyk36AFqz9WDaVD7yNqdpGcyDSl7V6otc0gFQi/+64Q4VxXOxJ IACYftE8ROhYklsCRs10GnL1I9DK4mD4uzjB7eYJgPMr37u98GARPw44dvCXUg== X-Spam-Score: -2.26 X-Migadu-Queue-Id: 2EAD02E3B8 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=cAQQBaL5; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -2.26 X-TUID: JZITwT2WZk8F Hi Attila, Ludovic Court=C3=A8s writes: > Hi, > > And sorry for the delay. > > Attila Lendvai skribis: > >>> > It's not enough to just handle the thrown exception, because we need = to be >>> > able to get hold of the fetched content, too. >>> >>> Would it make sense, then, to use the lower-level =E2=80=98http-get=E2= =80=99 from (web >>> client)? That would let the code deal with all the HTTP idiosyncrasies. >> >> >> i think it boils down to this trade-off: >> >> 1) keep http-fetch simpler, at the expense of reimplementing parts of >> it in the go importer (e.g. the redirection logic) >> >> 2) add this extra complexity to http-fetch, and avoid the extra >> complexity of a local, potentially half-assed %http-fetch in the go >> importer. >> >> 3) something else i'm not aware of > > For now, I=E2=80=99m somewhat in favor of #1. > > My take would be: try to implement whatever=E2=80=99s needed specifically= for > the Go importer; from there, we can eventually revisit that situation > and maybe switch to something that=E2=80=99s more like #2. > > How does that sound? I think we're missing your reworked 1/3 patch here, taking into account the= above feedback from Ludo. --=20 Thanks, Maxim