[Mono-list] Patch: Please review and check

Pablo Baena pbaena@uol.com.ar
Fri, 11 Jun 2004 16:55:52 +0000


--Boundary-00=_YQeyAMqXiS18cGz
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

This is a quick hack I had to make to make my application back to life. It 
seems that something changed in String.

Thanks!


--Boundary-00=_YQeyAMqXiS18cGz
Content-Type: text/plain;
  charset="us-ascii";
  name="patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch.txt"

? server/AssemblyInfo.cs
? server/AssemblyInfoModMono.cs
? server/Makefile
? server/Makefile.in
Index: ChangeLog
===================================================================
RCS file: /mono/xsp/ChangeLog,v
retrieving revision 1.50
diff -u -r1.50 ChangeLog
--- ChangeLog	11 Jun 2004 06:30:43 -0000	1.50
+++ ChangeLog	11 Jun 2004 19:53:47 -0000
@@ -1,3 +1,8 @@
+2004-06-11 Pablo Baena <pbaena@uol.com.ar>
+
+	* server/XSPApplicationHost.cs: fixed a little problem when comparing
+	paths that didn't let my applications run.
+
 2004-06-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
 	* test/Makefile.am: added typedesc.*
Index: server/XSPApplicationHost.cs
===================================================================
RCS file: /mono/xsp/server/XSPApplicationHost.cs,v
retrieving revision 1.28
diff -u -r1.28 XSPApplicationHost.cs
--- server/XSPApplicationHost.cs	10 Jun 2004 14:44:17 -0000	1.28
+++ server/XSPApplicationHost.cs	11 Jun 2004 19:53:48 -0000
@@ -543,8 +543,11 @@
 					continue;
 				}
 
-				if (path.StartsWith (v.vpath)) {
-					int matchLength = v.vpath.Length;
+				string delim = "/";
+				string tmp_path = path.Trim(delim.ToCharArray());
+				string tmp_vpath = v.vpath.Trim(delim.ToCharArray());
+				if (tmp_path.StartsWith (tmp_vpath)) {
+					int matchLength = tmp_vpath.Length;
 					if (matchLength > bestMatchLength) {
 						bestMatchLength = matchLength;
 						bestMatch = v;

--Boundary-00=_YQeyAMqXiS18cGz--