-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/url: Parse+String does not round trip magnet URLs #20054
Comments
We don't special case But perhaps we could tweak our heuristics for |
Hmm, so |
Part of the problem is that we parse the Opaque field out as the empty string. When we try to round trip, we notice that the Opaque field is empty and assume it's a hierarchical URL, which it is not. Perhaps, we should add a |
I would rather not add a new bool. If |
I am interested to work on this one, can someone assign it to me? so other people won't waste time on this |
CL https://golang.org/cl/49050 mentions this issue. |
Moving this to Go1.10 as per the CL update and given how deep we are in the freeze Go1.9. |
@dsnet @odeke-em could you guys please help to run trybot on CL https://golang.org/cl/49050, the previous trybot failed , however it is nothing to do with my change. |
Thanks for the ping @johnnyluo, I've ran the trybot. |
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:
prints
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
The text was updated successfully, but these errors were encountered: