From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iOnDH3WtaWLt4wAAbAwnHQ (envelope-from ) for ; Wed, 27 Apr 2022 22:54:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0LjkHnWtaWKGkgAAG6o9tA (envelope-from ) for ; Wed, 27 Apr 2022 22:54:13 +0200 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 C0F7735B96 for ; Wed, 27 Apr 2022 22:54:12 +0200 (CEST) Received: from localhost ([::1]:45256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njofq-0000IL-BM for larch@yhetil.org; Wed, 27 Apr 2022 16:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njofi-0000GN-5U for guix-patches@gnu.org; Wed, 27 Apr 2022 16:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njofh-0006ci-T0 for guix-patches@gnu.org; Wed, 27 Apr 2022 16:54:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1njofh-0004f4-Qd for guix-patches@gnu.org; Wed, 27 Apr 2022 16:54:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54836] [PATCH 1/2] http-client: Fix redirection. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Apr 2022 20:54:01 +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 Received: via spool by 54836-submit@debbugs.gnu.org id=B54836.165109281617878 (code B ref 54836); Wed, 27 Apr 2022 20:54:01 +0000 Received: (at 54836) by debbugs.gnu.org; 27 Apr 2022 20:53:36 +0000 Received: from localhost ([127.0.0.1]:44542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njofH-0004eI-UV for submit@debbugs.gnu.org; Wed, 27 Apr 2022 16:53:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njofG-0004e2-Ti for 54836@debbugs.gnu.org; Wed, 27 Apr 2022 16:53:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njofB-0006Yj-Bw; Wed, 27 Apr 2022 16:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=eMkkihghH6gEqGUG16RKbUl6oln8nU9w9OKvJhSWHbw=; b=Sml2nnXU+podjtIHitTH FNfwN0VA8oRzxlbvuv38Q1iLEIK8/IiRhcGvtx26MSLSU60zgQlfzaNYpfZfehfIS4zni7sm11osB cHRUV9n6mvMPNDQBwPofnljcZerSGhegR9varP3zOC0UNoeuxBvEbHSM/IsPRC6M8hHQ5dwThTUMf ppGzkdWjcuVFcmIiW3ZfxFyrYGZ+bbESsGxi7+LXVvgCjdbdkCdqPFlBkccNA3egfemElk8rmtbzp iCkJWFA3OIhzUDDGVZ4fO1wVSuEfXL3Ozitn7fOUXbAEfSfg6K5vEHVreQzqZwYkX8IGnXjicHBbz ZibOZMljOGIy4Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55179 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njofA-0004QD-Vw; Wed, 27 Apr 2022 16:53:29 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220410133431.30058-1-attila@lendvai.name> <20220410134114.371-1-attila@lendvai.name> <87v8vfiya2.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?UTF-8?Q?Flor=C3=A9al?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 27 Apr 2022 22:53:26 +0200 In-Reply-To: (Attila Lendvai's message of "Tue, 12 Apr 2022 07:28:33 +0000") Message-ID: <8735hyjlix.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651092853; 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=eMkkihghH6gEqGUG16RKbUl6oln8nU9w9OKvJhSWHbw=; b=srk1d0nBTZuISRDc1v9H4gXD9dt1w+LfT6Sq91ZhG07LRuzGxvi3qLKxATkOmr5liwqA0C DWU//y9FPUCrJgCUlVr4oEJU2o9NejPtu5CrPw4puG63Rc/Uw2UZi6BK451kiWRj5jZTDc PVsSQHVDNJ7Lxolq0fRMItgvyqJPoy9cvM7U8oDtewwzLhy6cSDt0pQOZPNDz1/1DDEqfw OQL+GTv/pF3z9rNAQ8aZkSpGikXSpTz0K7YgpO/Y2VcQ7X5NPooLRpmZhlQXi7TDd31NFA BuQdgPwpsb3Gz+YxFfrr7VdTDXQGrd4Fw++vtzqLLbLzhf4Fd/pBm5tHd8OXlA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651092853; a=rsa-sha256; cv=none; b=NBirHXeq/4q5p2WzEXovzez2HR4yH5uLpus6waem08ekTsQVaa7CS12njVTZP8q/mBR1Fe 06XXA1cftvCDPtj8SQE06OVyeP5sy1BqfPYqbe09/M2TOqGbudghC5RrDXjdvb1w3EpVzO Xq5uJcZauJrUiPdaxSA19BZ5ItaY9afV6OCd8CIjDGErLxfDyJxSG9EIZe6RBxGRhVvgGq 7RKQm3vBjqiyQ2HwutgKBRQe8Y06/eR3njseCje41qL8mBSFR/3E2IHHC64d8L04Ei7D9n LJCwLV+LC1LDlSB4Y6Jy+REsoVjNa5kFT7kZNS5hicwgCvT4Vvunjy4EUnL4rg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Sml2nnXU; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -5.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Sml2nnXU; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: C0F7735B96 X-Spam-Score: -5.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: uyvfQztGHOXQ Hi, And sorry for the delay. Attila Lendvai skribis: >> > It's not enough to just handle the thrown exception, because we need t= o 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 f= or 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? Thanks, Ludo=E2=80=99.