[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44906: Substitute requests fail if URL has trailing slash
From: |
Hartmut Goebel |
Subject: |
bug#44906: Substitute requests fail if URL has trailing slash |
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 |
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 |
- bug#44906: Substitute requests fail if URL has trailing slash,
Hartmut Goebel <=