diff options
author | Lawrence Pit <lawrence@mono-cvs.ximian.com> | 2002-05-09 12:57:13 +0400 |
---|---|---|
committer | Lawrence Pit <lawrence@mono-cvs.ximian.com> | 2002-05-09 12:57:13 +0400 |
commit | c55ce9b7f88c0ac1d7e163455822dbac93805062 (patch) | |
tree | 55132a3c1f2c5f44a449359fc001e11bf80b6178 /mcs/class/System/System | |
parent | 786a3bc57b193375dc43aaacbcdbdb79e9108d50 (diff) |
fix for Uri.GetLeftPart
svn path=/trunk/mcs/; revision=4436
Diffstat (limited to 'mcs/class/System/System')
-rw-r--r-- | mcs/class/System/System/ChangeLog | 4 | ||||
-rwxr-xr-x | mcs/class/System/System/Uri.cs | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mcs/class/System/System/ChangeLog b/mcs/class/System/System/ChangeLog index 8abc15cd52a..cceeeb801f0 100644 --- a/mcs/class/System/System/ChangeLog +++ b/mcs/class/System/System/ChangeLog @@ -1,3 +1,7 @@ +2002-05-09 Lawrence Pit <loz@cable.a2000.nl> + + * Uri.GetLeftPart fixed for mailto and news schemes. + 2002-05-05 Lawrence Pit <loz@cable.a2000.nl> * UriBuilder.cs: Implemented. diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs index 14af26e06b4..b9aa49e71cd 100755 --- a/mcs/class/System/System/Uri.cs +++ b/mcs/class/System/System/Uri.cs @@ -347,7 +347,12 @@ namespace System case UriPartial.Scheme : return scheme + GetSchemeDelimiter (scheme); case UriPartial.Authority : - return scheme + GetSchemeDelimiter (scheme) + host; + if (host == String.Empty || + scheme == Uri.UriSchemeMailto || + scheme == Uri.UriSchemeNews) + return String.Empty; + else + return scheme + GetSchemeDelimiter (scheme) + host; case UriPartial.Path : return scheme + GetSchemeDelimiter (scheme) + userinfo + (userinfo.Length > 0 ? "@" : String.Empty) + |