-
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: unexpected url encoding for ! in path #40894
Comments
Looking at RFC 3986 I agree that the addition of a character that must be escaped into a path element triggering other sub-delims to be percent encoded is surprising, but by my reading of the RFC not wrong. Can you explain how you found this issue and what problem is it causing for you? |
i found this,cause i build a web proxy use go,a url through this proxy,the “!” has been encoded to "21%",but the dest server also a proxy, dest server has a lot of rules to dispatch the request ,one of them is match the char “!”,because the "!" was encoded to "21%" when the request pass through my proxy server, so the dest server can not match correctly
i found this,cause i build a web proxy use go,a url through this proxy,the “!” has been encoded to "21%",but the dest server also a proxy, dest server has a lot of rules to dispatch the request ,one of them is match the char “!”,because the "!" was encoded to "21%" when the request pass through my proxy server, so the dest server can not match correctly and i also found the encoded logic is not the same, when path only has char "!" and when the path has any other char that need encode, the output can not keep the same, this is not what i want |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
alway Exist
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
for example
What did you see instead?
i found the code int sdk, "validEncoded" method treat the "!" as encoded, but in "escape" define "!" need encoed when mode is “encodePath”, where is judged in method "shouldEscape", logic conflict, so the result is not expected.
and i found other language do not encode "!" "(" ")" , such as python
The text was updated successfully, but these errors were encountered: