From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id T9bwKJKPwV/9TAAA0tVLHw (envelope-from ) for ; Fri, 27 Nov 2020 23:45:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GGY6JJKPwV9mYwAAB5/wlQ (envelope-from ) for ; Fri, 27 Nov 2020 23:45:22 +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 052C7940253 for ; Fri, 27 Nov 2020 23:45:22 +0000 (UTC) Received: from localhost ([::1]:38102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kinQW-0001XV-SO for larch@yhetil.org; Fri, 27 Nov 2020 18:45:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kinQE-0001XI-5I for bug-guix@gnu.org; Fri, 27 Nov 2020 18:45:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kinQD-0002H4-U8 for bug-guix@gnu.org; Fri, 27 Nov 2020 18:45:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kinQD-00065z-Pn for bug-guix@gnu.org; Fri, 27 Nov 2020 18:45:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44906: Substitute requests fail if URL has trailing slash Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 27 Nov 2020 23:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44906 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Hartmut Goebel , 44906@debbugs.gnu.org Received: via spool by 44906-submit@debbugs.gnu.org id=B44906.160652068823397 (code B ref 44906); Fri, 27 Nov 2020 23:45:01 +0000 Received: (at 44906) by debbugs.gnu.org; 27 Nov 2020 23:44:48 +0000 Received: from localhost ([127.0.0.1]:46624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kinPz-00065J-Nt for submit@debbugs.gnu.org; Fri, 27 Nov 2020 18:44:48 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:46815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kinPw-000655-VO for 44906@debbugs.gnu.org; Fri, 27 Nov 2020 18:44:46 -0500 Received: by mail-wr1-f50.google.com with SMTP id g14so7108553wrm.13 for <44906@debbugs.gnu.org>; Fri, 27 Nov 2020 15:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=2XbmVIoSLdH5ZVJ6kOSW44NjjG8+xuQIOfP64ToGNJs=; b=qtI54843jwXtP+iP8XeiKLSIP7RMpwuDJ+zKMCoLVxmTocla6Otzsk6nB3xENVJZLn SUimodHhzFAoU+E8pccFrn2lzyY453jJgLjlCG9gh6YRUwbu0Vn+vmM++nAhL9pUFTdo Lo491gOBHinOH1ijAKHCOzs7U2rHs/T5O9RQYz5q9pMRGcJ9rUIW6EstlMof3wIt01Cx 3qF3jaPVh70KG9sMaq/qKAniz/XvGZbYyFgdeSaXbQdMABZRvYWxSx5iY9LCNy+b1TFa P/zSQ5jlN3cTvAxRTkAm9gTnlsk7BilK4xxot7xTYfNMqfO4UrebHdXaDusIxLoz5Qi1 S9QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=2XbmVIoSLdH5ZVJ6kOSW44NjjG8+xuQIOfP64ToGNJs=; b=Fp7NyL1WQ4paL50EA3qwSZ1T/2mjfcvtD/CvQ8HoHVZ3893JR2aspdiSfaj3L7Kahg Gf34QqaUiGoRf+88BMKeiVN9+zxffu7xsIV7rtB/ilU0SyCBCo4mhnWc1JysiGO7azn+ JcND+DTAy/rrjNA8SHX23bZRZ2QyllsKdhmsRtEby6Zzx7ebczH85ik8Op1OgTj20rqO MUWnnz9fEA8m0nVYJRoL7GrVa59vicXKWOPpLztWA647baxR7o4A0VmJ2HrTx4tJ3kW3 pQbf6sAGj4jW6mYUfYWtcKGqzF79j5nUrtI9p6r5ayDzQs+M0mESzfVtvzxQy1Kmymb5 mwxg== X-Gm-Message-State: AOAM532VxpMigYj+WqLaE7Gb0SO2x6H8171xwo+sBcdiqZcnrk2EMeO8 o2WsCAikxGeEtPhwGFwPTjRxwBKk9YF4rQ== X-Google-Smtp-Source: ABdhPJx0ZsrOZ/4HpsTRxPktW0nCSjsOmaL6MejxFl9LJYqKAH+h5AvISmz9wg0WtquTrda3WkDFMA== X-Received: by 2002:adf:eb91:: with SMTP id t17mr13665240wrn.330.1606520678697; Fri, 27 Nov 2020 15:44:38 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id e1sm14653913wmd.16.2020.11.27.15.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 15:44:38 -0800 (PST) From: zimoun In-Reply-To: <3848e5d4-3694-e7f4-cb42-f97a51bde5b4@crazy-compilers.com> References: <3848e5d4-3694-e7f4-cb42-f97a51bde5b4@crazy-compilers.com> Date: Sat, 28 Nov 2020 00:37:22 +0100 Message-ID: <86a6v2qslp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.33 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=qtI54843; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-TUID: hGYhPOU2+ouw Dear, Thank you for the report. Tweaking the function such as: --8<---------------cut here---------------start------------->8--- (define (narinfo-request cache-url path) "Return an HTTP request for the narinfo of PATH at CACHE-URL." (let ((url (string-append cache-url "/" (store-path-hash-part path) ".narinfo")) (headers '((User-Agent . "GNU Guile")))) (format #t "~%Narinfo request: ~a~%~%" url) (build-request (string->uri url) #:method 'GET #:headers headers))) --8<---------------cut here---------------end--------------->8--- and removing the cache adequately, then running: --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix weather \ --substitute-urls=3D"https://ci.guix.gnu.org/ https://ci.guix.gnu.org"= \ hello computing 1 package derivations for x86_64-linux... looking for 1 store items on https://ci.guix.gnu.org/... Narinfo request: https://ci.guix.gnu.org//a462kby1q51ndvxdv3b6p0rsixxrgx1h.= narinfo updating substitutes from 'https://ci.guix.gnu.org/'... 100.0% https://ci.guix.gnu.org/ 0.0% substitutes available (0 out of 1) [...] 'https://ci.guix.gnu.org//api/queue?nr=3D1000' returned 400 ("Bad Request= ") looking for 1 store items on https://ci.guix.gnu.org... Narinfo request: https://ci.guix.gnu.org/a462kby1q51ndvxdv3b6p0rsixxrgx1h.n= arinfo updating substitutes from 'https://ci.guix.gnu.org'... 100.0% https://ci.guix.gnu.org 100.0% substitutes available (1 out of 1) [...] at least 1,000 queued builds [...] build rate: 36.89 builds per hour [...] --8<---------------cut here---------------end--------------->8--- On Fri, 27 Nov 2020 at 22:19, Hartmut Goebel = wrote: > According to RFC 7230, sec 2.7.3 "http and https URI Normalization and > Comparison" [1]: > > [=E2=80=A6] an empty > path component is equivalent to an absolute path of "/", so the > normal form is to provide a path of "/" instead. > > [1] https://tools.ietf.org/html/rfc7230#section-2.7.3 Now, the question is where should the fix go? =E2=80=9Cguix publish=E2=80= =9D exposing the narinfos or =E2=80=9Cguix weather=E2=80=9C? Or both? >From my understanding, one fix should go to =E2=80=98guix publish=E2=80=99 = exposing the narinfos since: https://ci.guix.gnu.org//a462kby1q51ndvxdv3b6p0rsixxrgx1h.narinfo should be a valid URL and return the narinfo file. However, taking this road, it means that the cache folder will not be the same: ~/.cache/guix/substitute/x2wcz6gz3evwlqcrz3fqstmezkfcfnpfb5kfyxbz7kjikc7upk= iq/ ~/.cache/guix/substitute/4refhwxbjmeua2kwg2nmzhv4dg4d3dorpjefq7kiciw2pfhaf2= 6a/ https://ci.guix.gnu.org/ resp. https://ci.guix.gnu.org Therefore, =E2=80= =98guix weather=E2=80=99 should be fixed too. WDYT? All the best, simon