Skip to content

Commit 70097d2

Browse files
elboulangerojbkempf
authored andcommitted
cli: Fix incorrect comment
A URL without a scheme is NOT a relative URL. Unfortunately I used this wrong term in a bunch of commit messages before. Sorry for the confusion. Fortunately I didn't use the term in any place of the code, except this very comment, so fix it now. For the avid reader: Wikipedia tells us that we can use the term "Protocol-relative URLs": > Protocol-relative links (PRL), also known as protocol-relative URLs > (PRURL), are URLs that have no protocol specified. For example, > `//example.com` will use the protocol of the current page, typically > HTTP or HTTPS However that's not what we use for HTTP+HTTPS mirrors, we use URLs that have only a host and a path. I'm still looking for the right term for that, if any...
1 parent ba86a18 commit 70097d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func (c *cli) CmdAdd(args ...string) error {
341341
fmt.Fprintf(os.Stderr, "The HTTP URL has an invalid scheme\n")
342342
os.Exit(-1)
343343
} else {
344-
// No scheme, that's a "relative URLs", and we do accept it.
344+
// No scheme, yes we do accept it.
345345
// Note that the documentation of net/url mentions that parsing
346346
// such URL is "invalid but may not necessarily return an error",
347347
// so let's add a scheme before we parse it.

0 commit comments

Comments
 (0)