Author: igorz
Date: 2007-12-23 09:58:01 -0500 (Sun, 23 Dec 2007)
New Revision: 91835

Modified:
   trunk/mcs/class/System.Web/System.Web.UI/Page.cs
   trunk/mcs/class/System.Web/System.Web/HttpContext.jvm.cs
   trunk/mcs/class/System.Web/System.Web/HttpException.cs
Log:
refactoring

Modified: trunk/mcs/class/System.Web/System.Web/HttpContext.jvm.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpContext.jvm.cs    2007-12-23 
14:42:13 UTC (rev 91834)
+++ trunk/mcs/class/System.Web/System.Web/HttpContext.jvm.cs    2007-12-23 
14:58:01 UTC (rev 91835)
@@ -53,6 +53,10 @@
 
                public bool IsDebuggingEnabled { get { return false; } }
 
+               internal bool IsServletRequest {
+                       get { return ServletRequest != null; }
+               }
+
                internal object GetWorkerService(Type t)
                {
                        IServiceProvider prv = WorkerRequest as 
IServiceProvider;

Modified: trunk/mcs/class/System.Web/System.Web/HttpException.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpException.cs      2007-12-23 
14:42:13 UTC (rev 91834)
+++ trunk/mcs/class/System.Web/System.Web/HttpException.cs      2007-12-23 
14:58:01 UTC (rev 91835)
@@ -163,7 +163,7 @@
                        WriteFileTop (builder, "Runtime Error");
                        builder.Append (@"<p><strong>Description:</strong> An 
application error occurred on the server. The current custom error settings for 
this application prevent the details of the application error from being viewed 
remotely (for security reasons)." + (
 #if TARGET_J2EE //on portal we cannot know if we run locally
-                               HttpContext.Current.ServletRequest == null ? 
String.Empty :
+                               !HttpContext.Current.IsServletRequest ? 
String.Empty :
 #endif
                                " It could, however, be viewed by browsers 
running on the local server machine.") 
                                + @"</p>

Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2007-12-23 14:42:13 UTC 
(rev 91834)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2007-12-23 14:58:01 UTC 
(rev 91835)
@@ -707,7 +707,7 @@
                CultureInfo ret = null;
                if (culture.StartsWith ("auto", 
StringComparison.InvariantCultureIgnoreCase)) {
 #if TARGET_J2EE
-                       if (Context.ServletRequest == null)
+                       if (!Context.IsServletRequest)
                                return deflt;
 #endif
                        string[] languages = Request.UserLanguages;

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

Reply via email to