GNU bug report logs -
#44906
Substitute requests fail if URL has trailing slash
Previous Next
Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Date: Fri, 27 Nov 2020 21:21:02 UTC
Severity: normal
Fixed in versions 49483, 49482
Done: Hartmut Goebel <h.goebel <at> goebel-consult.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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 <at> crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
This bug report was last modified 3 years and 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.