Hi I am confused by this discrepancy of URI/URL parsing between C#, Java and PHP.
For example, I have string url = "http://*.bar.com"
In C#: new Uri(url)
will throw a System.UriFormatException error,
But in Java new URL(url)
will pass, same as in PHP using parse_url(url)
(with $url = "http://*.bar.com")
Is that the C# is wrong or Java & PHP are wrong?
Update: I've consulted this page,even I put string url = "http://%2A.bar.com"
, the new Uri(url)
would fail. But interestingly, string url = "http://foo.domain.com/something/*"
will pass new Uri()