From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MPFcCVdxwV8FMwAA0tVLHw (envelope-from ) for ; Fri, 27 Nov 2020 21:36:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +HsTBVdxwV8RLQAAbx9fmQ (envelope-from ) for ; Fri, 27 Nov 2020 21:36:23 +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 980F89403C9 for ; Fri, 27 Nov 2020 21:36:22 +0000 (UTC) Received: from localhost ([::1]:53864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kilPh-0004qf-G0 for larch@yhetil.org; Fri, 27 Nov 2020 16:36:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kilAs-000660-VW for bug-guix@gnu.org; Fri, 27 Nov 2020 16:21:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kilAs-0003Wo-Nj for bug-guix@gnu.org; Fri, 27 Nov 2020 16:21:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kilAs-0006jS-Hq for bug-guix@gnu.org; Fri, 27 Nov 2020 16:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44906: Substitute requests fail if URL has trailing slash Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 27 Nov 2020 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44906 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 44906@debbugs.gnu.org X-Debbugs-Original-To: bug-guix Received: via spool by submit@debbugs.gnu.org id=B.160651200325783 (code B ref -1); Fri, 27 Nov 2020 21:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Nov 2020 21:20:03 +0000 Received: from localhost ([127.0.0.1]:46343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kil9u-0006hc-Ez for submit@debbugs.gnu.org; Fri, 27 Nov 2020 16:20:02 -0500 Received: from lists.gnu.org ([209.51.188.17]:38510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kil9r-0006hG-F0 for submit@debbugs.gnu.org; Fri, 27 Nov 2020 16:20:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kil9r-0005iY-9j for bug-guix@gnu.org; Fri, 27 Nov 2020 16:19:59 -0500 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:46240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kil9m-0003QX-Ou for bug-guix@gnu.org; Fri, 27 Nov 2020 16:19:59 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CjSFL3jPWz1rwml for ; Fri, 27 Nov 2020 22:19:50 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CjSFL3c4Cz1qtmp for ; Fri, 27 Nov 2020 22:19:50 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id uvbkKENM71Wv for ; Fri, 27 Nov 2020 22:19:48 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-58-171.dynamic.mnet-online.de [188.174.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Fri, 27 Nov 2020 22:19:48 +0100 (CET) Received: from thisbe.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 667F86028B for ; Fri, 27 Nov 2020 22:19:49 +0100 (CET) From: Hartmut Goebel Organization: crazy-compilers.com Message-ID: <3848e5d4-3694-e7f4-cb42-f97a51bde5b4@crazy-compilers.com> Date: Fri, 27 Nov 2020 22:19:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: none client-ip=2001:a60:0:28:0:1:25:1; envelope-from=h.goebel@crazy-compilers.com; helo=mail-out.m-online.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-Mailman-Approved-At: Fri, 27 Nov 2020 16:36:02 -0500 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: -2.27 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: qgBp8k14XbQX If the substitute-URL ends with a slash, api requests fail. Expected behavior: Substitute-URLs with and without trailing slash should behave the same. This is especially true for substitute-URLs with empty path ("http://server") and path "/" (http://server/") - for which the RFCs explicitly state to be equivalent. According to RFC 7230, sec 2.7.3 "http and https URI Normalization and Comparison" [1]: […] 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 How to reproduce: no trailing slash: $ guix weather --substitute-urls="https://ci.guix.gnu.org" gcc-toolchain … https://ci.guix.gnu.org   100.0% substitutes available (3 out of 3) … Trailing slash: $ guix weather --substitute-urls="https://ci.guix.gnu.org/" gcc-toolchain … https://ci.guix.gnu.org/   0.0% substitutes available (0 out of 3) …   'https://ci.guix.gnu.org//api/queue?nr=1000' returned 400 ("Bad Request") -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |