Author: krasnov
Date: 2007-05-16 11:33:14 -0400 (Wed, 16 May 2007)
New Revision: 77483

Modified:
   trunk/mcs/class/System.Web/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
Log:
* VirtualPathUtility.cs: Normalize method check more carefully if need to 
normalize, performance fix


Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2007-05-16 14:37:05 UTC 
(rev 77482)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2007-05-16 15:33:14 UTC 
(rev 77483)
@@ -1,3 +1,8 @@
+2007-05-16  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
+       * VirtualPathUtility.cs: Normalize method check more carefully if need
+       to normalize, performance fix
+
 2007-05-16  Konstantin Triger <[EMAIL PROTECTED]>
 
        * HttpContext.cs: correctly check for request locality.

Modified: trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs 2007-05-16 
14:37:05 UTC (rev 77482)
+++ trunk/mcs/class/System.Web/System.Web/VirtualPathUtility.cs 2007-05-16 
15:33:14 UTC (rev 77483)
@@ -301,7 +301,20 @@
 
                        path = Canonize (path);
 
-                       if (path.IndexOf ('.') < 0)
+                       int dotPos = path.IndexOf ('.');
+                       while (dotPos >= 0) {
+                               if (++dotPos == path.Length)
+                                       break;
+
+                               char nextChar = path [dotPos];
+
+                               if ((nextChar == '/') || (nextChar == '.'))
+                                       break;
+
+                               dotPos = path.IndexOf ('.', dotPos);
+                       }
+
+                       if (dotPos < 0)
                                return path;
 
                        bool starts_with_tilda = false;

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

Reply via email to