-
Notifications
You must be signed in to change notification settings - Fork 6k
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
System.Uri does not compact empty path segments as claimed #45550
Comments
I just tested and it works for me. I tested with .NET Framework 4.8, .NET 8, and .NET 9 using System;
namespace MyApp
{
public class App
{
public static void Main(string[] args)
{
string uriPath = "http://myUrl/other/../second/././/./hello";
var uri = new Uri(uriPath);
Console.WriteLine($"Original URI: {uriPath}");
Console.WriteLine($"AbsoluteUri: {uri.AbsoluteUri}");
Console.WriteLine($"PathAndQuery: {uri.PathAndQuery}");
}
}
} Output:
|
I'm going to close this issue. Please feel free to reopen it and add more details. |
Thanks for looking at this, @adegeo . Either I wasn't clear in my issue description, or you didn't fully assess your output, because it validates the issue I meant to describe. Your output still contains un-compacted empty segments. |
Type of issue
Typo
Description
This document claims that
It is not true that empty segments are removed.
Page URL
https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-uri
Content source URL
https://github.com/dotnet/docs/blob/main/docs/fundamentals/runtime-libraries/system-uri.md
Document Version Independent Id
ef49fced-bed9-9f02-5e78-a47784652c2c
Platform Id
3984eeb2-f354-0f34-b10a-6b1bf1599142
Article author
@gewarren
Metadata
Related Issues
Associated WorkItem - 417520
The text was updated successfully, but these errors were encountered: