Closed
Description
I received a private email with a report that Go inserts // in magnet URLs.
That appears to mean https://en.wikipedia.org/wiki/Magnet_URI_scheme.
Round-tripping the example from that wikipedia page:
package main
import (
"fmt"
"net/url"
)
func main() {
fmt.Println(url.Parse(`magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a&dn`))
}
prints
magnet://?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a&dn <nil>
https://play.golang.org/p/OQKMvDyTD-
It does seem like the leading // should not be there. However, I don't know how much this matters, nor how invasive this would be to fix, nor whether the // insertion is correct for any other schemes (in particular, http and https).
/cc @bradfitz