Skip to content

Fix invalid parsing of not unicode Uri - #59252

Merged
MihaZupan merged 2 commits into
dotnet:mainfrom
Maximys:fix/56482-invalid-unicode-uri-construction
Sep 21, 2021
Merged

MihaZupan merged 2 commits into
dotnet:mainfrom
Maximys:fix/56482-invalid-unicode-uri-construction

Conversation

@Maximys

@Maximys Maximys commented Sep 17, 2021 •

Copy link
Copy Markdown
Contributor

Fixes #56482

@ghost ghost added area-System.Net community-contribution Indicates that the PR has been added by a community member labels Sep 17, 2021
@ghost

ghost commented Sep 17, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

This PR fix issue-56482

Author: Maximys
Assignees: -
Labels:

area-System.Net

Milestone: -

@MihaZupan MihaZupan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The change seems good - we are only dealing with the edge case of an empty authority.

Can you please move the test to UriTests.cs? Given that it's a single test case, it doesn't need MemberData/Theory - it can be as simple as:

[Fact]
public static void UriWithUnicodeAndEmptyAuthority_ParsedCorrectly()
{
    const string UriString = "custom:///\u00FC";
    Assert.Equal(UriString, new Uri(UriString, UriKind.Absolute).ToString());
}

@Maximys

Maximys commented Sep 18, 2021

Copy link
Copy Markdown
Contributor Author

@MihaZupan , required changes of test was applied.

@MihaZupan MihaZupan modified the milestones: Future, 7.0.0 Sep 21, 2021
@MihaZupan
MihaZupan merged commit de6efa9 into dotnet:main Sep 21, 2021
@MihaZupan

Copy link
Copy Markdown
Member

Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
@Maximys
Maximys deleted the fix/56482-invalid-unicode-uri-construction branch May 24, 2023 04:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Uri constructor returns an object that does is not equal to the input

2 participants