2005-10-18 Lluis Sanchez Gual <lluis@novell.com>
authorLluis Sanchez <lluis@novell.com>
Tue, 18 Oct 2005 10:21:58 +0000 (10:21 -0000)
committerLluis Sanchez <lluis@novell.com>
Tue, 18 Oct 2005 10:21:58 +0000 (10:21 -0000)
* RemotingConfiguration.cs: The value for customErrors tag must be
case-insensitive. Fixes bug #76466 (patch by Robert Jordan).

svn path=/trunk/mcs/; revision=51861

mcs/class/corlib/System.Runtime.Remoting/ChangeLog
mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs

index a8f4b7c52fb8d31658679aa0b7bc2176ef12bc5a..9858a2ac45ddab9f4d3ae503bd1e39cd89b02781 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-18  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * RemotingConfiguration.cs: The value for customErrors tag must be
+       case-insensitive. Fixes bug #76466 (patch by Robert Jordan).
+       
 2005-10-17  Lluis Sanchez Gual  <lluis@novell.com>
 
        * RemotingConfiguration.cs: Rethrow catched exceptions
index d8b5f1dc763515a29a99173da3471ad4b47752c0..a3390fdef41f4ec01f327ea03fbe93754b2c8ed1 100644 (file)
@@ -367,10 +367,16 @@ namespace System.Runtime.Remoting
 
                internal static void SetCustomErrorsMode (string mode)
                {
-                       if (mode != "on" && mode != "off" && mode != "remoteOnly")
+                       if (mode == null)
+                               throw new RemotingException ("mode attribute is required");
+
+                       // the mode is case insensitive
+                       string m = mode.ToLower ();
+
+                       if (m != "on" && m != "off" && m != "remoteonly")
                                throw new RemotingException ("Invalid custom error mode: " + mode);
                                
-                       _errorMode = mode;
+                       _errorMode = m;
                }
        }