Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
csharp> using System.Net;
csharp> new Uri("/interstitial?url=http://malware-infected.site");
.Net keeps the relative URI "/interstitial?url=http://malware-infected.site".
is a valid Unix file name, while it's not for Windows - it's one of the few places where Uri differs from MS (we had a very test suite for it when we tested Moonlight)
Yep. And I guess scheme-less Uri's must be converted to file:// if locally valid?
This does work though, and may be OK for our use cases:
csharp> new Uri(new Uri("http://www.google.com"), new Uri("/interstitial?url=http://malware-infected.site"));
Even if /myfile.html is a valid uri in unix, should it be considered as relative or absolute? I'd say relative, but Mono/Linux says relative ... and absolute! Isn't is inconsistent (or should I go back reading the RFC)? At least, there should be some warning in the doc (I had the bad suprise while debugging an application we're porting from Windows to Linux).
string uri = "/myfile.html"
** An url can be absolute and relative? **
Uri.IsWellFormedUriString(uri, UriKind.Relative) -> yes
Uri.IsWellFormedUriString(uri, UriKind.Absolute) -> yes. weird! Both???
** Inconsistent result? **
Uri.TryCreate(uri, UriKind.Absolute, out tmp) -> tmp = file:///myfile.html
Uri.TryCreate(uri, UriKind.Relative, out tmp) -> tmp = /myfile.html
Uri.TryCreate(uri, UriKind.RelativeOrAbsolute, out tmp) -> tmp = file:///myfile.html