Bug 45129 - Uri.IsWellFormedUriString returns incorrect result for relative uris beginning with slash
Summary: Uri.IsWellFormedUriString returns incorrect result for relative uris beginnin...
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: 4.8.0 (C9)
Assignee: Marek Safar
Depends on:
Reported: 2016-10-06 17:38 UTC by cpisto+xamarin
Modified: 2016-10-10 12:12 UTC (History)
3 users (show)

Is this bug a regression?: Yes
Last known good build: 3.2.8

Test Case (273 bytes, text/plain)
2016-10-06 17:38 UTC, cpisto+xamarin

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description cpisto+xamarin 2016-10-06 17:38:30 UTC
Created attachment 17911 [details]
Test Case

Uri.IsWellformedUriString is returning False when it should be returning True for relative uris beginning with a slash - like "/test".

Test case is attached.

MS runtime output (correct):


Mono 4.6 output:

Comment 1 cpisto+xamarin 2016-10-06 18:01:17 UTC
Also of note, this is a regression, mono 3.2 behaves correctly.
Comment 2 Marek Safar 2016-10-07 11:58:50 UTC
Fixed in master and Mono 4.8
Comment 3 Mohit Kheterpal 2016-10-10 12:12:16 UTC
I have checked this issue and observed that this issue has been fixed in master build of MonoFramework-MDK-

Screencast : http://www.screencast.com/t/lqkoHk5DHvC0

Hence, closing this issue by marking it as Verified.