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

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 9 Sep 2003 08:33:03 -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=48288

--- shadow/48288	2003-09-09 08:33:03.000000000 -0400
+++ shadow/48288.tmp.11356	2003-09-09 08:33:03.000000000 -0400
@@ -0,0 +1,126 @@
+Bug#: 48288
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: Redhat 9.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+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 there is a bug in the Parse() function of
+System.Rutime.Remoting.Channels.Http.HttpChannel.
+Ths method is located in the HttpHelper.cs file and doesn't have the same
+behavior as the MS one
+
+
+Steps to reproduce the problem:
+Compile and run the folowing code:
+
+ 
+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:
+I'll join the source code of the test program