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 qgebBoB2e2H4KAAAgWs5BA (envelope-from ) for ; Fri, 29 Oct 2021 06:20:16 +0200 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 gDeNAYB2e2GiXwAAbx9fmQ (envelope-from ) for ; Fri, 29 Oct 2021 04:20:16 +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 8570A17E6D for ; Fri, 29 Oct 2021 06:20:15 +0200 (CEST) Received: from localhost ([::1]:39160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgJNG-00018i-Hk for larch@yhetil.org; Fri, 29 Oct 2021 00:20:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgJN4-00018Z-Ni for guix-patches@gnu.org; Fri, 29 Oct 2021 00:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgJN4-0007N5-EN for guix-patches@gnu.org; Fri, 29 Oct 2021 00:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgJN4-00072g-Ah for guix-patches@gnu.org; Fri, 29 Oct 2021 00:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51441] [PATCH] substitutes: keep base's uri-path for Properly construct URL. Resent-From: Peng Mei Yu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Oct 2021 04:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51441 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Z572 <873216071@qq.com> Cc: 51441@debbugs.gnu.org Received: via spool by 51441-submit@debbugs.gnu.org id=B51441.163548115927008 (code B ref 51441); Fri, 29 Oct 2021 04:20:02 +0000 Received: (at 51441) by debbugs.gnu.org; 29 Oct 2021 04:19:19 +0000 Received: from localhost ([127.0.0.1]:53732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgJMN-00071Y-LD for submit@debbugs.gnu.org; Fri, 29 Oct 2021 00:19:19 -0400 Received: from mx1.riseup.net ([198.252.153.129]:33636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgJMJ-00071I-Ry for 51441@debbugs.gnu.org; Fri, 29 Oct 2021 00:19:17 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4HgThZ2Y8tzDqtC; Thu, 28 Oct 2021 21:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1635481150; bh=rEEQFQiSOxNbgnEUUX4f6lsU0NKBOq5SPLpsv5jXdWM=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=rGSpLI1ii162DQrmtRVbXpAKvVpy9NwsQu6bPmkbZerdWNg9pmT+6NrOvaAI+XK5y ikFQIq92vYrZPK8S2YYMy/M0ex0HlsKIydNQwGem6OThZ13BmMVvbwQNsXzEZuVmBE PGCvsrMLbMnttTATWli5IhGkjE0LQ6hwVkNiFRfI= X-Riseup-User-ID: E6CD0B6F0FE2F72FD096C75181AB5B7662F472F1DFA5A39D4CABEFB0DB5728EC Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4HgThY31yrz1xqF; Thu, 28 Oct 2021 21:19:09 -0700 (PDT) Received: from localhost (dinosaur [local]) by dinosaur (OpenSMTPD) with ESMTPA id 6898a79d; Fri, 29 Oct 2021 04:18:52 +0000 (UTC) References: From: Peng Mei Yu In-reply-to: Date: Fri, 29 Oct 2021 12:18:52 +0800 Message-ID: <8735ok31lf.fsf@xqzp.net> MIME-Version: 1.0 Content-Type: text/plain 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=1635481215; 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: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=paiePW4fgKxq8jABVEqeJ8tVABva/YitMZZQJZ+UJvQ=; b=CphoQQrrn/rLVUVYTIXC1canMuwMH+UlbjiwLEYHP3UOgmZPN8I9HQdLcFs2DHxLobUIAb G3Utt4JS2oNcHTSMCJDV7/sGxLVZUE8temFjIpCd+fLSmCIYICoaqKxU6Cv5kRmDz6P9oL NCe4YJv0BAOrPbHVD/7arAf3uQ5NbyhQZE3ESkpsZbcNhcqV5gwiKqI7E5fDLgG4UYLOpk PVwQC6luVeIQWHLFBPpH76izMrgv5wy1xr7apZA5/oRWJ2bTSvghJ3WDERordMhR0e3V6S fYB+aaT/zNzVu3wPgH1s+rH3L60ul2A9IE1DG4ZXXu9f37gtNmppHAFoKFSIKA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635481215; a=rsa-sha256; cv=none; b=aIjxSuw2pjswpSbm7q0mAYzjtQaIo6NwzhC3ln+vTkuvSIVtL+4ViddOSexSCiWaMU08BQ OfC2Ta9GwP8L2LtPg+jPS8X+dlj0U8AP7WjR2EhBYwBZ3JqyMjIRT0Wcs2ZfRlxL0kOzv8 LOJxHsMtovviObpd6z3wvQH6J2eLT/hCmYHd92toWUuUYWHvTa5CI+NRmcmwjC5bRWOR6g qZvMXq/BScoz51TooSy/NK4vtsaS4g3kd+mPc5hugcL0cXSqo3Rs4DhOdyVc4WmneNXK8+ 12beheyJoNYG14UpeJkz8Lpr+PZiCsCVf8bL91V/JhxmXl/AsmWBjrt0Dlie2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=rGSpLI1i; 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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=rGSpLI1i; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=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-Queue-Id: 8570A17E6D X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: UzaBCovo2lSj Hi, 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) ".narinfo"))) > + #:path (string-append (uri-path base) "/" > + (store-path-hash-part path) ".narinfo"))) > (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. -- Peng Mei Yu