-
Notifications
You must be signed in to change notification settings - Fork 18k
net/url: roundtripping url which contains certain special characters (<>{} "
) fails
#73549
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
Comments
I believe this is working as intended. We only guarantee that the output is a valid encoding of the url, not that the exact input will be returned. |
@seankhliao I understand, however the returned encoding is semantically different to the input encoding, due to the path segment
|
According to RFC 3986, we consider them semantically equivalent https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2.2 Our position remains unchanged from #14815 (comment) , use RawPath if you wish to use some half decoded form, otherwise Path / EscapedPath will produce fully unescaped or escaped forms. |
From datatracker.ietf.org/doc/html/rfc3986#section-6.2.2.2:
The character in question here is |
Go version
go version go1.24.0 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/aFC9TP6bWBI
What did you see happen?
The output from the playground application:
What did you expect to see?
I expected to see
The text was updated successfully, but these errors were encountered: