Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

New Url encoders difference in behavior from Url.EscapeDataString #231

Closed
Praburaj opened this issue Mar 13, 2015 · 2 comments
Closed

New Url encoders difference in behavior from Url.EscapeDataString #231

Praburaj opened this issue Mar 13, 2015 · 2 comments

Comments

@Praburaj
Copy link
Contributor

@GrabYourPitchforks

Uri.EscapeDataString("https://www.googleapis.com/auth/plus.login") = "https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login"

With new encoder:

https:%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login
@GrabYourPitchforks
Copy link
Contributor

Per RFC 3986 (Appendix A) / RFC 3987 (Sec. 2.2), the segment, query, and fragment portions of a URI are all allowed to contain the colon character. I originally suspected that the Uri.EscapeDataString behavior was for compliance with RFC 2396, but even that older RFC allows colons pretty much everywhere (including in the userinfo). RFC 3986 was extended to allow colons in the host name to support IPv6 addresses. Will follow up with that team to find out the history behind this behavior.

@Praburaj
Copy link
Contributor Author

1e9d57f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants