From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mJZbEUoqVWIV9AAAgWs5BA (envelope-from ) for ; Tue, 12 Apr 2022 09:29:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0CYnCkoqVWJ6mgAAG6o9tA (envelope-from ) for ; Tue, 12 Apr 2022 09:29:14 +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 EB80A1A016 for ; Tue, 12 Apr 2022 09:29:13 +0200 (CEST) Received: from localhost ([::1]:42330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neAxb-0001hs-UQ for larch@yhetil.org; Tue, 12 Apr 2022 03:29:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neAxS-0001hW-Cf for guix-patches@gnu.org; Tue, 12 Apr 2022 03:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1neAxS-0007js-4U for guix-patches@gnu.org; Tue, 12 Apr 2022 03:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1neAxS-0006jW-1K for guix-patches@gnu.org; Tue, 12 Apr 2022 03:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54836] [PATCH 1/2] http-client: Fix redirection. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Apr 2022 07:29: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 54836@debbugs.gnu.org Received: via spool by 54836-submit@debbugs.gnu.org id=B54836.164974852825862 (code B ref 54836); Tue, 12 Apr 2022 07:29:01 +0000 Received: (at 54836) by debbugs.gnu.org; 12 Apr 2022 07:28:48 +0000 Received: from localhost ([127.0.0.1]:47237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neAxE-0006j4-Cv for submit@debbugs.gnu.org; Tue, 12 Apr 2022 03:28:48 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]:56273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neAxC-0006ia-1n for 54836@debbugs.gnu.org; Tue, 12 Apr 2022 03:28:47 -0400 Date: Tue, 12 Apr 2022 07:28:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail3; t=1649748519; bh=df/2c/yy4OmkeO0XKQ8D6UCnrWLLfTIkeGCSjT4BlyM=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=jym01A7azJZ99XB4c/h7OVb/m9+Vl3SR7u+M0G8E2WbqJNvi+OYUT5n4lzpRLv02c n1dTFhmJBw3iUEDbYp/Ewaq23+k7AkBqAzMZixiVXBEnTUI++v19/cg274m4K10MZx 87uXtY2aRnQGPTHYwC/m1l/G+IARCOKXE8FIQDlvSPEEJ/2CppU4FyIguAiIihf1Zm +3cLUn2xRivRXJIY+39E6ZYp2PLPrIJfSXKmDqfA6Dqk4DpiQpyLiM6mOUVatxGnZL T355LiOyP7Y69Htb6l90bZTrzupVInA7hpu3SSqWK4yobt8WXr66azCVoBAcySFOjk oP9tmor4cHoqw== From: Attila Lendvai Message-ID: In-Reply-To: <87v8vfiya2.fsf_-_@gnu.org> References: <20220410133431.30058-1-attila@lendvai.name> <20220410134114.371-1-attila@lendvai.name> <87v8vfiya2.fsf_-_@gnu.org> 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: , Reply-To: Attila Lendvai 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=1649748554; h=from:from:sender:sender:reply-to: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=df/2c/yy4OmkeO0XKQ8D6UCnrWLLfTIkeGCSjT4BlyM=; b=Sb6SX4ihvGLBcJBnISEmXGv3J2WUAyxEFcZdonnKEEb/Mlagbpts+9ulsrl+IGX0xDVUcm 94CjeH2/NbRhNVQJKAp6o/Vkzf7BzPn0kWJEBpQXVd/bzrvDF1WLCqDCg3eq0A9kHJd1Kf VPaJOAewg+IvUg57tdtnQoKX+/woo6VT6moYaRPsB3TavGQSxcPXAH6F8YvwxHx3wRdVBv jNZCH8+jO8LMPtBVKQclJ4GeCKnFeSCJWfS4Qz3j1/oe+GFRKb1NN9kSQYQfkBHNK6RNg1 puFThBXZ7QU4Jt8/yeUwyTENEtQAHbKB9e7/YYolqsqK4+2FyhvnVvySsDbQ1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649748554; a=rsa-sha256; cv=none; b=iyrGh3h9J1POpS5BsXnBM3CLzq4uvFbeVzPErqWJIBlKXIMx5J8zX70ET6oRW51VPIvC5k zcuIGkYyhsh7kzvcdHiDB22YIyX9otjlYnAC4arNmSmk/clDV2dT+LDHahiiQJ+kSljOyl ni7uMJR8wDtYz9VpAjCfHkX6X+fo9AxXtPeQ5i0sZTzhMlGz8gPE47FH3pEZq5AwKYQo3H d7FwgWd4yt2oP92Yypee3ShJMrQTc3oi3CBkYF9yextUkqJOuh6YENHfhqLhtq2GezjM4Y maxtggULy9Ik431+T/6Jjwf/o8ukMy6oNuIMhu67qcHkdLfXe7+D/50wRHaNqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail3 header.b=jym01A7a; dmarc=none; 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: 2.14 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail3 header.b=jym01A7a; dmarc=none; 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: EB80A1A016 X-Spam-Score: 2.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: EMJLxWzOmxGg > > 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 please advise how to reshape this patch/feature, because it's needed to file my go importer patches. -- =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- The use of power is only needed when you want to do something harmful, othe= rwise love is enough to get everything done.