Author: gonzalo
Date: 2006-04-25 16:18:03 -0400 (Tue, 25 Apr 2006)
New Revision: 59869

Modified:
   branches/mono-1-1-13/xsp/ChangeLog
   branches/mono-1-1-13/xsp/src/Mono.WebServer/MonoWorkerRequest.cs
Log:
2006-04-25 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * src/Mono.WebServer/MonoWorkerRequest.cs: remove all the duplicated
        slashes and don't do an extra Replace on non-windows.



Modified: branches/mono-1-1-13/xsp/ChangeLog
===================================================================
--- branches/mono-1-1-13/xsp/ChangeLog  2006-04-25 20:16:19 UTC (rev 59868)
+++ branches/mono-1-1-13/xsp/ChangeLog  2006-04-25 20:18:03 UTC (rev 59869)
@@ -1,3 +1,8 @@
+2006-04-25 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * src/Mono.WebServer/MonoWorkerRequest.cs: remove all the duplicated
+       slashes and don't do an extra Replace on non-windows.
+
 2006-04-06 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * src/server.cs: make the hash different when the last argument is an

Modified: branches/mono-1-1-13/xsp/src/Mono.WebServer/MonoWorkerRequest.cs
===================================================================
--- branches/mono-1-1-13/xsp/src/Mono.WebServer/MonoWorkerRequest.cs    
2006-04-25 20:16:19 UTC (rev 59868)
+++ branches/mono-1-1-13/xsp/src/Mono.WebServer/MonoWorkerRequest.cs    
2006-04-25 20:18:03 UTC (rev 59869)
@@ -223,10 +223,14 @@
                        if (path.StartsWith (HostVPath) && (path.Length == len 
|| path [len] == '/'))
                                path = path.Substring (len + 1);
 
-                       if (path.Length > 0 && path [0] == '/')
+                       while (path.Length > 0 && path [0] == '/') {
                                path = path.Substring (1);
+                       }
 
-                       return Path.Combine (HostPath, path.Replace ('/', 
Path.DirectorySeparatorChar));
+                       if (Path.DirectorySeparatorChar != '/')
+                               path = path.Replace ('/', 
Path.DirectorySeparatorChar);
+
+                       return Path.Combine (HostPath, path);
                }
 
                protected abstract bool GetRequestData ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to