Author: igorz
Date: 2007-05-15 10:58:27 -0400 (Tue, 15 May 2007)
New Revision: 77415
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog
trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
Log:
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.
* ConfigurationLocationCollection.cs: for TARGET_JVM only:
location path is case-insensitive.
* PageMapper.cs: reverted r77353, 77321
make it case-insensitive
Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-05-15 14:37:26 UTC (rev 77414)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-05-15 14:58:27 UTC (rev 77415)
@@ -1,3 +1,8 @@
+2007-05-15 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+ * ConfigurationLocationCollection.cs: for TARGET_JVM only:
+ location path is case-insensitive.
+
2007-05-15 Marek Habersack <[EMAIL PROTECTED]>
* ConfigurationElement.cs: added value validation on
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
2007-05-15 14:37:26 UTC (rev 77414)
+++
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationLocationCollection.cs
2007-05-15 14:58:27 UTC (rev 77415)
@@ -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: trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
2007-05-15 14:37:26 UTC (rev 77414)
+++ trunk/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
2007-05-15 14:58:27 UTC (rev 77415)
@@ -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-15 Marek Habersack <[EMAIL PROTECTED]>
* BuildProviderCollection.cs: refactoring - use
Modified:
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
2007-05-15 14:37:26 UTC (rev 77414)
+++
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
2007-05-15 14:58:27 UTC (rev 77415)
@@ -122,7 +122,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
@@ -173,7 +183,11 @@
} else {
int i;
if (locationSubPath == null)
+ {
configPath = fullPath;
+ if (configPath.Length > 1)
+ configPath =
VirtualPathUtility.RemoveTrailingSlash (configPath);
+ }
else
configPath = locationSubPath;
@@ -260,6 +274,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) {
@@ -267,10 +293,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:
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
2007-05-15 14:37:26 UTC (rev 77414)
+++
trunk/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
2007-05-15 14:58:27 UTC (rev 77415)
@@ -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: trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog 2007-05-15
14:37:26 UTC (rev 77414)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog 2007-05-15
14:58:27 UTC (rev 77415)
@@ -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: trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs 2007-05-15
14:37:26 UTC (rev 77414)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs 2007-05-15
14:58:27 UTC (rev 77415)
@@ -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