From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sGSNA9OCe2FSPgAAgWs5BA (envelope-from ) for ; Fri, 29 Oct 2021 07:12:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eELdOtKCe2G8ewAA1q6Kng (envelope-from ) for ; Fri, 29 Oct 2021 05:12:50 +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 C949310BF5 for ; Fri, 29 Oct 2021 07:12:50 +0200 (CEST) Received: from localhost ([::1]:42726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgKC6-0002yX-42 for larch@yhetil.org; Fri, 29 Oct 2021 01:12:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgJcY-0000OK-LZ for guix-patches@gnu.org; Fri, 29 Oct 2021 00:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgJcY-0008Qj-6o for guix-patches@gnu.org; Fri, 29 Oct 2021 00:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgJcY-0007SL-1k for guix-patches@gnu.org; Fri, 29 Oct 2021 00:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51441] [PATCH] substitutes: keep base's uri-path for Properly construct URL. Resent-From: Z572 <873216071@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Oct 2021 04:36:01 +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: Peng Mei Yu Cc: 51441@debbugs.gnu.org Received: via spool by 51441-submit@debbugs.gnu.org id=B51441.163548210828598 (code B ref 51441); Fri, 29 Oct 2021 04:36:01 +0000 Received: (at 51441) by debbugs.gnu.org; 29 Oct 2021 04:35:08 +0000 Received: from localhost ([127.0.0.1]:53752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgJbg-0007RC-6X for submit@debbugs.gnu.org; Fri, 29 Oct 2021 00:35:08 -0400 Received: from out203-205-251-82.mail.qq.com ([203.205.251.82]:45891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1mgJbb-0007QQ-S0 for 51441@debbugs.gnu.org; Fri, 29 Oct 2021 00:35:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1635482093; bh=c6H/sz4/VC1eGpn1BKVRp9QXvgD2E/GYim9Qhe/Ro9g=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=uSGogWRuajFHfNvf01zh7uvViMLS7b2zr0j7Hf54tjnNNnpY4Ger3q1qacyZqGnuo IwsZNMDEqdzxL6hSfZqXsIMFgw0y6B9BOIRETGhfYQRRHjbb3BAaI9zfKVCu5y2qDG s6eDOfjzPDqGzrN9jozOkMOqLep8RJaunNQzXtJ0= Received: from asus ([2409:8928:12b2:1ae2:4b81:7b88:7db5:8a95]) by newxmesmtplogicsvrszc7.qq.com (NewEsmtp) with SMTP id 8B32985F; Fri, 29 Oct 2021 12:34:51 +0800 X-QQ-mid: xmsmtpt1635482091t2bpewaep Message-ID: X-QQ-XMAILINFO: MU1mHg6zgTYV0iybCWM1WvVZcdjD+Odv9DSAoYg0BI3gMAakJ6ie2+WfVDdE9U JNSzpYtDrHIKTAf7RRqDv/xKw2b29ePDwukyh/vLp/V/qTpvyODLLxnthsQCtsa94zHWc3dQT6Y4 6E8o0KoAPktkIHG89bl7YTbV9HGG1MG5C+XsSAPFvdzpbxn9cfgkDRK1P8//b3oik92cF1xRMoSi s8yHlKQkXprvs0Vtvvz2S03CV/XZ3C/dlVhbkDhAtLcM7RY6DFu/URbOpUdgohACQuvrdfN+iJyC 0sxKrX7pWqYHP3BEz6zA8j1336ib3BMCkrF1nwZA3X4HuExZ+b3w7IAM34LTmE5EAsQp9Ar7/6Lh u9GchAmkWtBBQUwhnEPxCbEwZIjT2pub/VC3yNWjlNtXOUSZGH1zzp/0aVgqNUvvHFqwa+rtJQci q3v+uWsgzKtcLOGTzwKRldpE1NaIPvsEHtRCifcyehvc2RKxcEaoMgThZXygToRUIgCb0f86HcvQ MYGynG4J3KcxY/Zzf9MnEY3IgFu6nacmZCFXQCw42ycZjc/opcPlhOBYLKnxZqlsxA213OY2AgcA Y/W8Ni7RvSPqx33Zo5e+9c0U6yEK/Fdgg5e7zyVjuc2sbidZo2pvABaeq2B+U+8QPWhFGUDK4h0A zKCpyjjU5zvmxE4PBIxUWdmcisEpvm90pyvtPOQz7L6wY2n25qp+hPNyGFEkQ6LEc6FwmKAbcbnZ TWyfEEhPywhyv4aziMTdHra0FpXl0CHxhqD3IZYImVECU9wr0kn8AsN9Tq4oS6NQ5FIQTC61pnnU t05Zi4FDLivg== References: <8735ok31lf.fsf@xqzp.net> User-agent: mu4e 1.6.6; emacs 28.0.50 Date: Fri, 29 Oct 2021 12:33:42 +0800 In-reply-to: <8735ok31lf.fsf@xqzp.net> Message-ID: <87a6is4ff8.fsf@qq.com> 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" Reply-to: Z572 <873216071@qq.com> X-ACL-Warn: , Z572 via Guix-patches From: Z572 via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635484370; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id: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=c6H/sz4/VC1eGpn1BKVRp9QXvgD2E/GYim9Qhe/Ro9g=; b=P8fv01qVjIFpoS1MRGFHQ3a30BqgiCz+E97m4HwdTMdXbFB9xwh4MUHxYfSeQXb6+n+UPu 2ycnvFAuJOC8F+LLxEfRAPDycIYySwtNKS0CYRKtmC+33fhy92uJ5CtGol3EwR9g1Z03dm p9r/DkkdlwthT7S2x8jpjANZLQOmv5m61pnjknjRIwki6S2iGkoyOIpWjcsR0ubmV/+kwA IIiar1ljvf+LoM8SyMIh9lYxJutkAA+tjv4F6YOA7lpUkKyL/rVRl4NjQUnbrJOf8KxySf ok0fckRiSqAgPsn9oh1e36CwgvW+xRknVjcQ0EzHxyEIcLv51d3Im9JYSP857A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635484370; a=rsa-sha256; cv=none; b=i51SQA1b3nqxSZseZAK+RDTfHsaskebBNxT7bEp7FNRoKOWVAjVSj4ROIDsqF99lADa8D2 J4+TIj/mPcU8mSi2dMY8PYGic/fnm0VQbM4/9l3q9f/rv24RLWq4adNuu66trk9Y883eAQ wEuVzlNQ50Lo3o3RZQigk3hlQX+e6NIvjQ0zkTtpmSacTkczL6CCx/R7BI0yhDE4Jadtqu ur4GcjMySWvpj5ElJm0FNFnveoImL0aupLs/t2h9pTVhz6t+0JXFa82SA/5yZzBZ5vkFYp dWMRhXxksdTPSYXYEoz3/bhDlGPzXMCELl4asRoELG9ei2MHc1q6py1XX1IpaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=uSGogWRu; 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-Spam-Score: 1.98 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=uSGogWRu; 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: C949310BF5 X-Spam-Score: 1.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: AkzOG27r1LdO Peng Mei Yu writes: > 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. Yes, you are right. -- over