You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Previously I filed #11253. Another undocumented quirk is that the .GetLeftPart method knows if a Uri is already encoded, so calling it again doesn't result in double encoding. This should be included in the official documentation. Discovering small undocumented behaviors during runtime was not a great experience.
We were under assumption it always to encoding based on previous issue.
Overall, this is a useful method because it removes the SAS token from the URI.
The text was updated successfully, but these errors were encountered:
erdembayar
changed the title
.GetLeftPart doesn't do encoding for already unicode characters
.GetLeftPart doesn't do encoding for already encoded unicode characters
Apr 28, 2025
Let me post offline comment on behalf of @MihaZupan:
GetLeftPart is just a shorthand for picking the set of UriComponent flags to pass to GetComponents.
E.g. calling .GetLeftPart(UriPartial.Authority) is the same as calling .GetComponents(UriComponents.Scheme | UriComponents.UserInfo | UriComponents.Host | UriComponents.Port, UriFormat.UriEscaped)
This is how basically all properties on Uri behave (Host, Query, PathAndQuery, AbsoluteUri, ...)
erdembayar
changed the title
.GetLeftPart doesn't do encoding for already encoded unicode characters
Document .GetLeftPart doesn't do encoding for already encoded unicode characters
May 8, 2025
Sure, I just changed the title to clarify the intention for this issue. Please documents what to expect when someone calls this method. Otherwise we have to decompile all the new methods to find out what it does under the hood.
Hi,
Previously I filed #11253. Another undocumented quirk is that the .GetLeftPart method knows if a Uri is already encoded, so calling it again doesn't result in double encoding. This should be included in the official documentation. Discovering small undocumented behaviors during runtime was not a great experience.
We were under assumption it always to encoding based on previous issue.
Overall, this is a useful method because it removes the SAS token from the URI.
The text was updated successfully, but these errors were encountered: