From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id W0XFJTO1smD7aAEAgWs5BA (envelope-from ) for ; Sat, 29 May 2021 23:42:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yABsIDO1smA2egAAB5/wlQ (envelope-from ) for ; Sat, 29 May 2021 21:42:11 +0000 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 0007D1F936 for ; Sat, 29 May 2021 23:42:10 +0200 (CEST) Received: from localhost ([::1]:43906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln6if-0005v5-Sq for larch@yhetil.org; Sat, 29 May 2021 17:42:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln6iZ-0005te-Gf for guix-patches@gnu.org; Sat, 29 May 2021 17:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln6iY-00080u-4a for guix-patches@gnu.org; Sat, 29 May 2021 17:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln6iY-0004GI-2v for guix-patches@gnu.org; Sat, 29 May 2021 17:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47174] [PATCH 0/2] substitute: Handle closing connections to substitute servers. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 May 2021 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47174 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 47174@debbugs.gnu.org Received: via spool by 47174-submit@debbugs.gnu.org id=B47174.162232451916374 (code B ref 47174); Sat, 29 May 2021 21:42:02 +0000 Received: (at 47174) by debbugs.gnu.org; 29 May 2021 21:41:59 +0000 Received: from localhost ([127.0.0.1]:57843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln6iV-0004G1-6n for submit@debbugs.gnu.org; Sat, 29 May 2021 17:41:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln6iT-0004Fo-70 for 47174@debbugs.gnu.org; Sat, 29 May 2021 17:41:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55828) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln6iN-0007vS-Oj; Sat, 29 May 2021 17:41:51 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41664 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln6iN-0005Qq-Gj; Sat, 29 May 2021 17:41:51 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2eodxyy.fsf@cbaines.net> <20210520120413.21644-1-mail@cbaines.net> Date: Sat, 29 May 2021 23:41:49 +0200 In-Reply-To: <20210520120413.21644-1-mail@cbaines.net> (Christopher Baines's message of "Thu, 20 May 2021 13:04:12 +0100") Message-ID: <87zgwd43qa.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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622324531; 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; bh=AKHzOgYOLnJ6pXjOT338HRQPY3gogmGyy0L4i5CTGgE=; b=cRV/Yn50M5EEf+1bySFQ9JBs4Xl5aaEVDPYyZQhHWyzY6SgU6hBfKGA4keR+Tes5c5TRdP 0YpNj9fMAW6/xonXgBiGpSbNhq9h1KWKmdKE4S14HNPCHWqDRz2W4yXzM6pcVP+52QbLsl QYzFGZI40Z0feU5FYO3N4IO6AsLTNC0oHqXxjrX+3/FUqXHfY/yN6LyJ3KUunkavbybKvF XcX1ycd5lscpuewcJIzti0qQhzLsc8nrgYEcDF4yKm2izllX5ZiHzu0tX62W0NgT3RVRyP DKf1q0bxPbPVYVZK58KKvqLbDVduMzfXgYOsESRvZIxIMbS7Ey+lVGafzR9g5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622324531; a=rsa-sha256; cv=none; b=PKotNEr2TXIo14i6ScBkBFmwsoga07IXHW1UWTeMexAznDZ0lQCv6RmvrviQ+ayBPVqz2S zSo/o9ZJxnh81voGchsfjmmLUUzhFvptS3JalCpQajFyYgBKZ7cojO99Ol31t5nMBXSVTO +YqvwOiIC70J5WBb7tWgRuMI8ejSx/4tYPEXPBk7ZG8TyECm+khgHHWSaFreGKI75BBCxN jeGMLRz8HDUgUAfbWi80mAXv0Td3HjfCMjm5Rzx+tCV0dcZvgSTgpwzmD8kFdGmgDjWETf LZURSa6H9IEMH3BEi+ng+2K7tpudd2G4x2B+tgiFAiqyumS1pctnFND2DfplkA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0007D1F936 X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: IIa4iHn/SfWB Hi Chris, Christopher Baines skribis: > Rather than just the port and response-content-length. I'm looking at us= ing > the response headers within the substitute script to work out when to clo= se > the connection. > > * guix/http-client.scm (http-fetch): Return the response as the second va= lue, > rather than the response-content-length. > * guix/build/download-nar.scm (download-nar): Adapt accordingly. > * guix/build/download.scm (url-fetch): Adapt accordingly. > * guix/scripts/substitute.scm (process-substitution): Adapt accordingly. Nitpick: use =E2=80=9Chttp-client:=E2=80=9D rather than =E2=80=9Cguix:=E2= =80=9D as the subject line. > + (let-values (((port resp) Conventionally we=E2=80=99d spell it out: =E2=80=98response=E2=80=99. Otherwise LGTM. Thanks, Ludo=E2=80=99.