Merge pull request #1222 from LogosBible/uri-trycreate
[mono.git] / mcs / class / System / System / Uri.cs
index eab294b3f8f00fb84b3caf15d1acf4b4c1246a71..a1417e99527c0bd59f0befff9246110310ab4080 100644 (file)
@@ -233,6 +233,11 @@ namespace System {
                                        success = false;
                                        break;
                                }
+
+                               if (success && host.Length > 1 && host [0] != '[' && host [host.Length - 1] != ']') {
+                                       // host name present (but not an IPv6 address)
+                                       host = host.ToLower (CultureInfo.InvariantCulture);
+                               }
                        }
                }
 
@@ -1132,9 +1137,6 @@ namespace System {
                {
                        Parse (kind, source);
 
-                       if (userEscaped)
-                               return;
-
                        if (host.Length > 1 && host [0] != '[' && host [host.Length - 1] != ']') {
                                // host name present (but not an IPv6 address)
                                host = host.ToLower (CultureInfo.InvariantCulture);