[Mono-bugs] [Bug 48468][Nor] New - HttpChannel.Parse doesn't work properly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 14 Sep 2003 14:19:29 -0400 (EDT)


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 jean-marc.andre@polymtl.ca.

http://bugzilla.ximian.com/show_bug.cgi?id=48468

--- shadow/48468	2003-09-14 14:19:29.000000000 -0400
+++ shadow/48468.tmp.1624	2003-09-14 14:19:29.000000000 -0400
@@ -0,0 +1,115 @@
+Bug#: 48468
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: Redhat 9.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jean-marc.andre@polymtl.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: HttpChannel.Parse doesn't work properly
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+I think thaht the Parse() method of the HttpChannel (implemented in
+HttpHelper.cs) doesn't return the right value & the right out parameter 
+
+
+Steps to reproduce the problem:
+Build and run the following code (I'll join the source file)
+
+using System;
+using System.Collections;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Http;
+
+class MainClass
+{
+	public static void Main(string[] args)
+	{
+		HttpServerChannel myHttpServerChannel = 
+		      new HttpServerChannel(4000);
+		ChannelServices.RegisterChannel(myHttpServerChannel);
+		ArrayList lst = new ArrayList();
+		
+		lst.Add("http://localhost:8085/RemoteActivator.rem");
+		lst.Add("http://localhost/RemoteActivator.rem");
+		lst.Add("http://localhost:4000/RemoteActivator.rem");
+		lst.Add("http://192.168.150.1:4000/RemoteActivator.rem");
+		lst.Add("http://192.168.150.1:4000");
+		lst.Add("ftp://192.168.150.1/test.txt");
+		lst.Add("ftp://192.168.150.1:4000");
+		lst.Add("http://www.google.com/Test");
+		lst.Add("http://localhost:8085/54333_65464_65434_900");
+		lst.Add("/6674322_432456435_5328_98743/54345427_54534_654");
+		
+		string uri;
+		foreach(string url in lst)
+		{
+			Console.WriteLine("URL: {0}", url);
+			Console.WriteLine("\tChannel URI: {0}\tobject uri: {1}",
+myHttpServerChannel.Parse(url, out uri), uri); 
+		}
+	}
+}
+
+Actual Results:
+URL: http://localhost:8085/RemoteActivator.rem
+	Channel URI: http://localhost:8085	object uri: RemoteActivator.rem
+URL: http://localhost/RemoteActivator.rem
+	Channel URI: http://localhost	object uri: RemoteActivator.rem
+URL: http://localhost:4000/RemoteActivator.rem
+	Channel URI: http://localhost:4000	object uri: RemoteActivator.rem
+URL: http://192.168.150.1:4000/RemoteActivator.rem
+	Channel URI: http://192.168.150.1:4000	object uri: RemoteActivator.rem
+URL: http://192.168.150.1:4000
+	Channel URI: http://192.168.150.1:4000	object uri: 
+URL: ftp://192.168.150.1/test.txt
+	Channel URI: ftp:	object uri: /192.168.150.1/test.txt
+URL: ftp://192.168.150.1:4000
+	Channel URI: ftp:	object uri: /192.168.150.1:4000
+URL: http://www.google.com/Test
+	Channel URI: http://www.google.com	object uri: Test
+URL: http://localhost:8085/54333_65464_65434_900
+	Channel URI: http://localhost:8085	object uri: 54333_65464_65434_900
+URL: /6674322_432456435_5328_98743/54345427_54534_654
+	Channel URI: 	object uri: 6674322_432456435_5328_98743/54345427_54534_654
+
+
+
+Expected Results:
+URL: http://localhost:8085/RemoteActivator.rem
+	Channel URI: http://localhost:8085	object uri: /RemoteActivator.rem
+URL: http://localhost/RemoteActivator.rem
+	Channel URI: http://localhost	object uri: /RemoteActivator.rem
+URL: http://localhost:4000/RemoteActivator.rem
+	Channel URI: http://localhost:4000	object uri: /RemoteActivator.rem
+URL: http://192.168.150.1:4000/RemoteActivator.rem
+	Channel URI: http://192.168.150.1:4000	object uri: /RemoteActivator.rem
+URL: http://192.168.150.1:4000
+	Channel URI: http://192.168.150.1:4000	object uri: 
+URL: ftp://192.168.150.1/test.txt
+	Channel URI: 	object uri: 
+URL: ftp://192.168.150.1:4000
+	Channel URI: 	object uri: 
+URL: http://www.google.com/Test
+	Channel URI: http://www.google.com	object uri: /Test
+URL: http://localhost:8085/54333_65464_65434_900
+	Channel URI: http://localhost:8085	object uri: /54333_65464_65434_900
+URL: /6674322_432456435_5328_98743/54345427_54534_654
+	Channel URI: 	object uri: 
+
+How often does this happen? 
+always
+
+Additional Information: