Merge pull request #463 from strawd/concurrent-requests
[mono.git] / mcs / class / System.Net.Http / System.Net.Http.Headers / Parser.cs
index 45e6ebca6f294cc4f804abf1821cbad24bc6ac05..8489ae9bf724447a9fbb163afe9563ec281b64c2 100644 (file)
@@ -125,6 +125,17 @@ namespace System.Net.Http.Headers
                        }
                }
 
+               public static class Host
+               {
+                       public static bool TryParse (string input, out string result)
+                       {
+                               result = input;
+
+                               System.Uri dummy;
+                               return System.Uri.TryCreate ("http://u@" + input + "/", UriKind.Absolute, out dummy);
+                       }
+               }
+
                public static class Int
                {
                        public static bool TryParse (string input, out int result)