Author: kostat
Date: 2007-04-01 04:40:02 -0400 (Sun, 01 Apr 2007)
New Revision: 75253

Modified:
   trunk/mcs/class/System.Web/System.Web/BrowserCapabilities.cs
   trunk/mcs/class/System.Web/System.Web/ChangeLog
Log:
Default Browser (userAgent) property to 'Unknown'

Modified: trunk/mcs/class/System.Web/System.Web/BrowserCapabilities.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/BrowserCapabilities.cs        
2007-04-01 05:07:21 UTC (rev 75252)
+++ trunk/mcs/class/System.Web/System.Web/BrowserCapabilities.cs        
2007-04-01 08:40:02 UTC (rev 75253)
@@ -241,7 +241,9 @@
                public string Browser {
                        get {
                                if (!Get (HaveBrowser)) {
-                                       browser = ReadString("browser");
+                                       browser = this ["browser"];
+                                       if (browser == null || browser.Length 
== 0)
+                                               browser = "Unknown";
                                        Set (HaveBrowser);
                                }
 
@@ -595,8 +597,7 @@
                }
 #endif
                Exception CreateCapabilityNotFoundException (string key) {
-                       string userAgent = key == "browser" ? null : this 
["browser"];
-                       return new ArgumentNullException (String.Format 
("browscaps.ini does not contain a definition for capability {0} for userAgent 
{1}", key, userAgent));
+                       return new ArgumentNullException (String.Format 
("browscaps.ini does not contain a definition for capability {0} for userAgent 
{1}", key, Browser));
                }
 
                bool Get (int idx)

Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2007-04-01 05:07:21 UTC 
(rev 75252)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2007-04-01 08:40:02 UTC 
(rev 75253)
@@ -1,3 +1,7 @@
+2007-04-01  Konstantin Triger <[EMAIL PROTECTED]>
+
+       * BrowserCapabilities.cs: Default Browser (userAgent) property to 
'Unknown'.
+
 2007-03-29  Vladimir Krasnov  <[EMAIL PROTECTED]>
 
        * HttpContext.cs: timeout methods removed from TARGET_J2EE compilation

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

Reply via email to