diff options
author | John Luke <jluke@mono-cvs.ximian.com> | 2003-12-05 06:38:34 +0300 |
---|---|---|
committer | John Luke <jluke@mono-cvs.ximian.com> | 2003-12-05 06:38:34 +0300 |
commit | 920206633a75483d40dbd6ce31d92b16395194d4 (patch) | |
tree | b7fbb052aaccf1854022b2b6359b0b4ec783c473 | |
parent | 6dd94efd7a3d2b9ea9c32cc6d85a0d314e63d8f9 (diff) |
2003-12-04 John Luke <jluke@cfl.rr.com>
* Uri.cs: applied patch from Chris Masters <neeeeeep@bigpond.com>
fixes bug #51510. ftp uses port 21, https uses 443 and
parse the host name properly for UNC path.
svn path=/trunk/mcs/; revision=20796
-rw-r--r-- | mcs/class/System/System/ChangeLog | 6 | ||||
-rwxr-xr-x | mcs/class/System/System/Uri.cs | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/mcs/class/System/System/ChangeLog b/mcs/class/System/System/ChangeLog index 67845cc3257..6d8a6298644 100644 --- a/mcs/class/System/System/ChangeLog +++ b/mcs/class/System/System/ChangeLog @@ -1,3 +1,9 @@ +2003-12-04 John Luke <jluke@cfl.rr.com> + + * Uri.cs: applied patch from Chris Masters <neeeeeep@bigpond.com> + fixes bug #51510. ftp uses port 21, https uses 443 and + parse the host name properly for UNC path. + 2003-10-10 Pedro Martínez Juliá <yoros@wanadoo.es> * Uri.cs: fixed a problem with some URIs like file://some_file.txt diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs index 7bfdc83f9af..1794a3ca2b3 100755 --- a/mcs/class/System/System/Uri.cs +++ b/mcs/class/System/System/Uri.cs @@ -851,8 +851,7 @@ namespace System path = host + path; host = String.Empty; } else if (isUnixFilepath) { - path = host + path; - host = String.Empty; + // leave it alone } else if (host.Length == 0) { throw new UriFormatException ("Invalid URI: The hostname could not be parsed"); } @@ -875,8 +874,8 @@ namespace System static UriScheme [] schemes = new UriScheme [] { new UriScheme (UriSchemeHttp, SchemeDelimiter, 80), - new UriScheme (UriSchemeHttps, SchemeDelimiter, 223), - new UriScheme (UriSchemeFtp, SchemeDelimiter, 23), + new UriScheme (UriSchemeHttps, SchemeDelimiter, 443), + new UriScheme (UriSchemeFtp, SchemeDelimiter, 21), new UriScheme (UriSchemeFile, SchemeDelimiter, -1), new UriScheme (UriSchemeMailto, ":", 25), new UriScheme (UriSchemeNews, ":", -1), |