if ((format < UriFormat.UriEscaped) || (format > UriFormat.SafeUnescaped))
throw new ArgumentOutOfRangeException ("format");
- Match m = uri_regex.Match (uri.OriginalString);
+ Match m = uri_regex.Match (uri.OriginalString.Trim ());
string scheme = scheme_name;
int dp = default_port;
uri = new Uri(" \r \n http://test.com\r\n \r\r ");
Assert.AreEqual ("http://test.com/", uri.ToString(), "#k0");
+ Assert.AreEqual ("http", uri.GetComponents (UriComponents.Scheme, UriFormat.UriEscaped), "#k0-gc");
uri = new Uri ("http://contoso.com?subject=uri");
Assert.AreEqual ("/", uri.AbsolutePath, "#k1");