[Mono-bugs] [Bug 51510][Wis] New - Uri class does not parse the host name properly for UNC path.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 30 Nov 2003 08:14:14 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by rkumar@novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=51510
--- shadow/51510 2003-11-30 08:14:14.000000000 -0500
+++ shadow/51510.tmp.3589 2003-11-30 08:14:14.000000000 -0500
@@ -0,0 +1,65 @@
+Bug#: 51510
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: rkumar@novell.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Uri class does not parse the host name properly for UNC path.
+
+Description of Problem:
+System.Uri class does not get the host name correctly for UNC path.
+
+Steps to reproduce the problem:
+1. Compile and run the following sample.
+
+using System;
+
+namespace Test {
+ public class UriTest {
+ public static void Main() {
+ string fileName = "//server/path/file";
+ Uri testUri = new Uri(fileName);
+ Console.WriteLine("IsUnc: " + testUri.IsUnc);
+ Console.WriteLine("Scheme: " + testUri.Scheme);
+ Console.WriteLine("Port: " + testUri.Port);
+ Console.WriteLine("Host: " + testUri.Host);
+ Console.WriteLine("IsFile: " + testUri.IsFile);
+ Console.WriteLine("LocalPath: " + testUri.LocalPath);
+ Console.WriteLine("AbsPath: " + testUri.AbsolutePath);
+ Console.WriteLine("Loopback: " + testUri.IsLoopback);
+}
+ }
+}
+
+
+Actual Results:
+IsUNC: True
+Scheme: file
+Host:
+Port:
+Local Path:
+Absolute Path:
+
+Expected Results:
+IsUNC: True
+Scheme: file
+Host: server
+Port: -1
+Local Path:
+Absolute Path:
+
+How often does this happen?
+Always
+
+Additional Information:
+Expected results are the results that I get on .NET.