-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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 documentation does not adequately explain escaping rules or RFC compliance #30611
Comments
See https://tools.ietf.org/html/rfc6874, the delimiter is "%25". Also, #20669 might describe the limitation of IPv6 LLA /w zone in URI. |
Thanks for the fast response. If not an issue with Go per-se then I consider this an issue with documentation, as the godoc for |
Then, please re-title this issue. |
Would adding "IPv6 addresses must be encoded according to RFC 3986 and 6874." to the documentation of |
@neilalexander, would @Cosmonawt's proposed change address your issue? (@rsc and @bradfitz are listed as the owners of this package, so I'll leave it to them to decide whether such a change would be a net improvement from a maintainer's perspective.) |
I think it would help, but it would be better if it makes an explicit mention of the fact that it affects link-local addresses containing the interface specifier as it will save people time in the future. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, see playground.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
See playground:
What did you expect to see?
IPv6 link-local literals should be accepted and
fe80::1%en0
should be returned within theHost
.What did you see instead?
Parsing error due to invalid URL escape with the percent sign - in above example produces:
The text was updated successfully, but these errors were encountered: