c# - Uri accept bad url that start with "www-" -


i'm using code block:

if (!uri.trycreate("http://www­-.ageofauti­sm.com/201­0/01/wakef­ields-scie­nce-proven­-valid-aga­in-in-new-­study-that­-replicate­s-findings­.html", urikind.absolute, out url) || url.host == string.empty)  throw new invalidurlexception(inputurl); 

and function uri.trycreate returns true, instead of false. url broken because: "www-" not valid prefix.

can explain this?

www­-.ageofauti­sm.com valid my-super-server.ageofauti­sm.com

if adress exists different question.


Comments