[Mono-bugs] [Bug 54042][Maj] New - ASP.NET failure on OS X because of incorrect case sensitivity check
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 8 Feb 2004 12:38:08 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by panix-lists@skinnee.net.
http://bugzilla.ximian.com/show_bug.cgi?id=54042
--- shadow/54042 2004-02-08 12:38:08.000000000 -0500
+++ shadow/54042.tmp.13016 2004-02-08 12:38:08.000000000 -0500
@@ -0,0 +1,48 @@
+Bug#: 54042
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details: Mac OS X 10.3.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: panix-lists@skinnee.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ASP.NET failure on OS X because of incorrect case sensitivity check
+
+Download, compile, and install Mono and XSP on Mac OS X. Go to the XSP tests directory and
+start XSP in the interpreter. Hit any page, and you will see the error:
+
+ "Both Web.config and web.config exist"
+
+The issue is the way that Mac OS X's HFS+ filesystem handles case sensitivity.
+In HFS+, case is stored, but is not exactly observed. So, if I create a file on my filesystem called
+"Web.config", when I `ls`, it will show up as "Web.config". But, if I vi the lowercase version
+("web.config"), it will open the original file. Hence, case is stored, but the filesystem is not truly
+case sensitive.
+
+The problem in Mono occurs in the GetConfigFromFileName(...) on line 136 of
+WebConfigurationSettings.cs. This method checks to see if "web.config" exists, and then checks
+to see if "Web.config" exists. If both exist, it throws an exception, which kills any ASPX in its
+tracks. On my Mac OS X machine, only one web.config file exists, but it can be reached with
+either name because of the aforementioned case sensitivity issue.
+
+The check that is performed in the code looks at DirectorySeparatorChar to determine if you are
+on a UNIX machine, and then assumes case sensitivity. The conditional currently reads
+something like:
+
+ if (DirectorySeparatorChar == '/' && isUpper && isLower) {
+ throw Exception;
+ }
+
+A fix would be for the conditional to read:
+
+ if ((platform != MACOSX) && DirectorySeparatorChar == '/' && isUpper && isLower)
+ throw Exception;
+ }