From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MNraBqw1tWE0TgAAgWs5BA (envelope-from ) for ; Sun, 12 Dec 2021 00:35:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cI9dAqw1tWFBbgAAbx9fmQ (envelope-from ) for ; Sat, 11 Dec 2021 23:35:08 +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 D4DA21101A for ; Sun, 12 Dec 2021 00:35:07 +0100 (CET) Received: from localhost ([::1]:38844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwBtT-0003sC-2g for larch@yhetil.org; Sat, 11 Dec 2021 18:35:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwBtO-0003r3-BS for guix-patches@gnu.org; Sat, 11 Dec 2021 18:35:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwBtO-0006Hn-2k for guix-patches@gnu.org; Sat, 11 Dec 2021 18:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwBtN-0005UQ-UP for guix-patches@gnu.org; Sat, 11 Dec 2021 18:35:01 -0500 Subject: bug#51441: [PATCH] substitutes: keep base's uri-path for Properly construct URL. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sat, 11 Dec 2021 23:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 51441 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Peng Mei Yu Cc: Z572 <873216071@qq.com>, 51441-done@debbugs.gnu.org Mail-Followup-To: 51441@debbugs.gnu.org, ludo@gnu.org, 873216071@qq.com Received: via spool by 51441-done@debbugs.gnu.org id=D51441.163926568721076 (code D ref 51441); Sat, 11 Dec 2021 23:35:01 +0000 Received: (at 51441-done) by debbugs.gnu.org; 11 Dec 2021 23:34:47 +0000 Received: from localhost ([127.0.0.1]:50279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwBt9-0005Ts-7n for submit@debbugs.gnu.org; Sat, 11 Dec 2021 18:34:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwBt8-0005Tf-C8 for 51441-done@debbugs.gnu.org; Sat, 11 Dec 2021 18:34:46 -0500 Received: from [2001:470:142:3::e] (port=42600 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwBt1-0006GF-CM; Sat, 11 Dec 2021 18:34:39 -0500 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=sVzeCBR+J2/u9gpRudAu4RnZn4WBUYjrB7FJczcxJDw=; b=J1Qh2IM+g+uvOauAITCv h4+WW3TOKQy/Rk/Lf5Whq3EMQQDQ8fWNvPXGZn+yFlme8cRjlEazVYTp/GwXAiXdiiyaAudIqT9qf 5VjlrcNXEsNu6CNz/Nu6pIQScuv56nwrukjvGhIlAC9chkGE0DAAtSv9MquGeXqwedvQMajzqtvku VXVJo4YCimfJGeeH73eajWTT6zxbKvcPR+qeIj0p95/SpQIDKD7fUlb/Uo47jhkdagpLC7gaxwlMx Hqo4CEJGz1BH8NURPEiZ85AG6mK7jiO27G1lktKh4sIzoWnqss/VKeIUtVXHs9IxbjD4bg8tpbfsF fllbSeajXVR04A==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37138 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwBt1-0004H5-5u; Sat, 11 Dec 2021 18:34:39 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8735ok31lf.fsf@xqzp.net> Date: Sun, 12 Dec 2021 00:34:36 +0100 In-Reply-To: <8735ok31lf.fsf@xqzp.net> (Peng Mei Yu's message of "Fri, 29 Oct 2021 12:18:52 +0800") Message-ID: <87sfuy4sxf.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=1639265707; 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-to: 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=sVzeCBR+J2/u9gpRudAu4RnZn4WBUYjrB7FJczcxJDw=; b=TIfgSQYFK9OGhK5zkcbeBcnTk9w7aluaO5JU8cUsyAfxdCMGUFgh09q/F4txUzvkWK1VMI JvwcBcVmv1CIrNTYHIOkdELl+tS4S53uf9Xx3OuzoAtzuOcNv6cRDOoO8lsZL6EF3HsTYt p+m/61Y5sDa6an0Umd8GIawT71ePzzqW7VbErEjqZZyR2gjAPwvY1T2UlZOwXIUXpWTDTv P+AXRBZCaiHokN05eVvUCkl6j6680h3iAg8XUZQPEOwrnA2WzFVWlc3qIC1yPu736M5eKI CngD0BGLLhZYedTJbWjYdL5BPty12jcu8/LiRIEUOkK+YHYOiLwZCqvfdWfFBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639265707; a=rsa-sha256; cv=none; b=rqMvylGCb0hnmG/jn2L2OxFyuR4PUhdG8NhSavCOYm2m9C/sYuIFf8Ii1wPIJEF1bqTOIL rgkJSjtro1psnjB6Ll/o9DKyEi/WejjlRl418W+zhxZGWCfsvHRjVfzIfhP/vs1O8483QV sTh9mD4AcJGIFek1GFwzPu54XAriaHbyywGKtf1hZZTB9DKQtFA3oAIAlMkbQ7ldRNfAmm jNMI6A3fJx39XGX1nGnGc/C9EoPxco6F8OoUy5V7TMnZbLKx3LPVJJXhBraidfbCc17DBv HE4OSJs9GTWrz3CjU5E1Ae4XGVwrVaBofKWIWRJexxRdH6nGVMUUaTQMTqOfoQ== 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=J1Qh2IM+; 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: -3.66 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=J1Qh2IM+; 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: D4DA21101A X-Spam-Score: -3.66 X-Migadu-Scanner: scn1.migadu.com X-TUID: XqbU4GhLMlTf Hi, Peng Mei Yu skribis: > Z572 via Guix-patches via writes: > >> @@ -158,7 +159,8 @@ (define (narinfo-request cache-url path) >> "Return an HTTP request for the narinfo of PATH at CACHE-URL." >> (let* ((base (string->uri cache-url)) >> (ref (build-relative-ref >> - #:path (string-append (store-path-hash-part path) ".nari= nfo"))) >> + #:path (string-append (uri-path base) "/" >> + (store-path-hash-part path) ".nari= nfo"))) >> (url (resolve-uri-reference ref base)) >> (headers '((User-Agent . "GNU Guile")))) >> (build-request url #:method 'GET #:headers headers))) >> -- > > It seems that the root cause for the problem is that cache-url lacks a > trailing slash. Therefore the last path component is stripped from > `base` when we compute (resolve-uri-reference ref base). So I think > ensuring cache-url ends with a slash ("/") is a better approach. Indeed. I=E2=80=99ve implemented your suggestion in e68466de122d94ac3fa75aae234cd5fd89482a5a, and commit cba0395c99005f94e4ccd6c058362af7443dab12 makes a related adjustment. Note that we still need to update the =E2=80=98guix=E2=80=99 package so you= can benefit from the bug fix. In the meantime you have to pass that trailing slash. Thank you, and sorry for the delay! Ludo=E2=80=99.