Author: gonzalo
Date: 2005-05-07 19:12:22 -0400 (Sat, 07 May 2005)
New Revision: 44212

Modified:
   trunk/mcs/class/System.Web/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web/HttpResponse.cs
   trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs
Log:
2005-05-07 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * HttpResponse.cs: no need to save/restore the thread culture when
        getting the Date header. According to Ben's profiling, this is a big
        deal in performance.

        * HttpRuntime.cs: ignore exceptions that might be thrown when unloading 
        a domain.



Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2005-05-07 22:37:58 UTC 
(rev 44211)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2005-05-07 23:12:22 UTC 
(rev 44212)
@@ -1,3 +1,12 @@
+2005-05-07 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * HttpResponse.cs: no need to save/restore the thread culture when
+       getting the Date header. According to Ben's profiling, this is a big
+       deal in performance.
+
+       * HttpRuntime.cs: ignore exceptions that might be thrown when unloading 
+       a domain.
+
 2005-05-04 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * HttpApplicationFactory.cs: ignore any exception thrown when invoking

Modified: trunk/mcs/class/System.Web/System.Web/HttpResponse.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpResponse.cs       2005-05-07 
22:37:58 UTC (rev 44211)
+++ trunk/mcs/class/System.Web/System.Web/HttpResponse.cs       2005-05-07 
23:12:22 UTC (rev 44212)
@@ -184,22 +184,16 @@
                
                private ArrayList GenerateHeaders ()
                {
-                       ArrayList oHeaders = new ArrayList (_Headers.ToArray 
());
+                       ArrayList oHeaders = new ArrayList (_Headers);
 
                        oHeaders.Add (new HttpResponseHeader ("X-Powered-By", 
"Mono"));
-                       // save culture info, we need us info here
-                       CultureInfo oSavedInfo = 
Thread.CurrentThread.CurrentCulture;
-                       Thread.CurrentThread.CurrentCulture = 
CultureInfo.InvariantCulture;
-
-                       string date = DateTime.UtcNow.ToString ("ddd, d MMM 
yyyy HH:mm:ss ");
+                       string date = DateTime.UtcNow.ToString ("ddd, d MMM 
yyyy HH:mm:ss ", CultureInfo.InvariantCulture);
                        HttpResponseHeader date_header = new HttpResponseHeader 
("Date", date + "GMT");
                        oHeaders.Add (date_header);
                        
                        if (IsCached)
                                cached_response.DateHeader = date_header;
 
-                       Thread.CurrentThread.CurrentCulture = oSavedInfo;
-
                        if (_lContentLength > 0) {
                                oHeaders.Add (new HttpResponseHeader 
(HttpWorkerRequest.HeaderContentLength,
                                                                      
_lContentLength.ToString ()));

Modified: trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs        2005-05-07 
22:37:58 UTC (rev 44211)
+++ trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs        2005-05-07 
23:12:22 UTC (rev 44212)
@@ -244,7 +244,9 @@
 
                void DoUnload (object state)
                {
-                       AppDomain.Unload (AppDomain.CurrentDomain);
+                       try { 
+                               AppDomain.Unload (AppDomain.CurrentDomain);
+                       } catch {}
                }
 
                internal void Dispose() {

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

Reply via email to