Make Zone.CreateFromUrl() work with URLs like file://C:\foo\bar
authorNiklas Therning <niklas@therning.org>
Thu, 1 Sep 2016 14:43:50 +0000 (16:43 +0200)
committerNiklas Therning <niklas@therning.org>
Thu, 1 Sep 2016 14:43:50 +0000 (16:43 +0200)
commit3a2063b0719533e19ecdba7a979c5a50d38981c9
tree15c48f35da8266d87f532549e5ff084673060c0c
parent097c8e17cbc9b1197610d90a24ecd16baa86675c
Make Zone.CreateFromUrl() work with URLs like file://C:\foo\bar

On Windows the test used URLs like `file://C:\tmp\foo` which the
Mono.Security.Uri class was incapable of parsing. System.Uri from
referencesource parses such URLs just fine. This patch fixes the Uri class to
be able to parse such URLs. It also changes the Zone class to not throw an
exception if the Zone.CreateFromUrl() method is passed an invalid URL. Instead
the zone is set to NoZone. This seems to be how Zone in .NET behaves.
mcs/class/corlib/Mono.Security/Uri.cs
mcs/class/corlib/System.Security.Policy/Zone.cs
mcs/class/corlib/Test/System.Security.Policy/ZoneTest.cs