Author: igorz
Date: 2007-05-15 11:12:00 -0400 (Tue, 15 May 2007)
New Revision: 77418

Modified:
   
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ChangeLog
   
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
   
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
   
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
   
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
   branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/ChangeLog
   branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
Log:
merged r77414-77415

Modified: 
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ChangeLog
        2007-05-15 15:06:32 UTC (rev 77417)
+++ 
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ChangeLog
        2007-05-15 15:12:00 UTC (rev 77418)
@@ -1,3 +1,8 @@
+2007-05-15 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * ConfigurationLocationCollection.cs: for TARGET_JVM only:
+       location path is case-insensitive.
+               
 2007-05-09 Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * ConfigurationManager.cs:

Modified: 
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
       2007-05-15 15:06:32 UTC (rev 77417)
+++ 
branches/mainsoft/gh20/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
       2007-05-15 15:12:00 UTC (rev 77418)
@@ -50,7 +50,11 @@
                internal ConfigurationLocation Find (string location)
                {
                        foreach (ConfigurationLocation loc in InnerList)
+#if TARGET_JVM
+                               if (String.Compare (loc.Path, location, 
StringComparison.OrdinalIgnoreCase) == 0)
+#else
                                if (loc.Path == location)
+#endif
                                        return loc;
                        return null;
                }

Modified: 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
  2007-05-15 15:06:32 UTC (rev 77417)
+++ 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
  2007-05-15 15:12:00 UTC (rev 77418)
@@ -1,3 +1,11 @@
+2007-05-15  Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * WebConfigurationManager.cs: 
+       make configurations hashtable case-insensitive.
+       * WebConfigurationHost.cs: for TARGET_J2EE only:
+       GetStreamName returns file path in right case, that make it works 
+       on case-sensitive file system.
+
 2007-05-14  Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * WebConfigurationManager.cs: 

Modified: 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
    2007-05-15 15:06:32 UTC (rev 77417)
+++ 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
    2007-05-15 15:12:00 UTC (rev 77418)
@@ -156,7 +156,17 @@
 
                                if (map == null)
 #if TARGET_J2EE
+                               {
+                                       // check META-INF/web.config exists
+                                       java.lang.ClassLoader cl = 
(java.lang.ClassLoader) AppDomain.CurrentDomain.GetData 
("GH_ContextClassLoader");
+                                       if (cl == null)
+                                               return null;
+                                       java.net.URL url = cl.getResource 
("META-INF/web.config");
+                                       if (url == null)
+                                               return null;
+
                                        return "/META-INF/web.config";
+                               }
 #else
                                        mdir = Path.GetDirectoryName 
(System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile);
 #endif
@@ -207,7 +217,11 @@
                        } else {
                                int i;
                                if (locationSubPath == null)
+                               {
                                        configPath = fullPath;
+                                       if (configPath.Length > 1)
+                                               configPath = 
VirtualPathUtility.RemoveTrailingSlash (configPath);
+                               }
                                else
                                        configPath = locationSubPath;
 
@@ -295,6 +309,18 @@
 
                string GetWebConfigFileName (string dir)
                {
+#if TARGET_J2EE
+                       DirectoryInfo d = GetCaseSensitiveExistingDirectory 
(new DirectoryInfo (dir));
+                       if (d == null)
+                               return null;
+
+                       FileInfo file = (FileInfo) FindByName ("web.config", 
d.GetFiles ("W*"));
+                       if (file == null)
+                               file = (FileInfo) FindByName ("web.config", 
d.GetFiles ("w*"));
+
+                       if (file != null)
+                               return file.FullName;
+#else
                        string[] filenames = new string[] {"Web.Config", 
"Web.config", "web.config" };
 
                        foreach (string fn in filenames) {
@@ -302,10 +328,30 @@
                                if (File.Exists (file))
                                        return file;
                        }
+#endif
+                       return null;
+               }
+#if TARGET_J2EE
+               static DirectoryInfo GetCaseSensitiveExistingDirectory 
(DirectoryInfo dir) {
+                       if (dir.Exists)
+                               return dir;
 
+                       DirectoryInfo parent = 
GetCaseSensitiveExistingDirectory (dir.Parent);
+                       if (parent == null)
+                               return null;
+
+                       return (DirectoryInfo) FindByName (dir.Name, 
parent.GetDirectories ());
+               }
+               
+               static FileSystemInfo FindByName (string name, FileSystemInfo 
[] infos)
+               {
+                       for (int i = 0; i < infos.Length; i++) {
+                               if (String.Compare (name, infos [i].Name, 
StringComparison.OrdinalIgnoreCase) == 0)
+                                       return infos [i];
+                       }
                        return null;
                }
-               
+#endif
                public virtual bool IsAboveApplication (string configPath)
                {
                        throw new NotImplementedException ();

Modified: 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
 2007-05-15 15:06:32 UTC (rev 77417)
+++ 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
 2007-05-15 15:12:00 UTC (rev 77418)
@@ -79,7 +79,7 @@
                                        lock (AppDomain.CurrentDomain){
                                                object initialized = 
AppDomain.CurrentDomain.GetData("WebConfigurationManager.configurations.initialized");
                                                if (initialized == null){
-                                                       table = 
Hashtable.Synchronized (new Hashtable ());
+                                                       table = 
Hashtable.Synchronized (new Hashtable (StringComparer.OrdinalIgnoreCase));
                                                        configurations = table;
                                                }
                                        }

Modified: branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/ChangeLog
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/ChangeLog       
2007-05-15 15:06:32 UTC (rev 77417)
+++ branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/ChangeLog       
2007-05-15 15:12:00 UTC (rev 77418)
@@ -1,3 +1,8 @@
+2007-05-15  Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * PageMapper.cs: reverted r77353, 77321
+       make it case-insensitive
+
 2007-05-14  Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * PageMapper.cs: 

Modified: 
branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs   
2007-05-15 15:06:32 UTC (rev 77417)
+++ branches/mainsoft/gh20/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs   
2007-05-15 15:12:00 UTC (rev 77418)
@@ -439,10 +439,6 @@
                }
                internal string GetTypeFromResources()
                {
-                       string phisicalPath = _context.Request.MapPath (_url);
-                       if (!File.Exists (phisicalPath) && !Directory.Exists 
(phisicalPath))
-                               return null;
-
                        string typeName = null;
 
                        //if the desciptor exists in the war - get the type

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

Reply via email to