Author: mhabersack
Date: 2007-08-09 04:28:12 -0400 (Thu, 09 Aug 2007)
New Revision: 83717

Modified:
   trunk/xsp/ChangeLog
   trunk/xsp/src/ModMonoWorker.cs
Log:
2007-08-09  Marek Habersack  <[EMAIL PROTECTED]>

        * src/ModMonoWorker.cs: move request unregister call from the
        finally block to the catch block. This is to avoid unregistering
        the request while it is still being processed by the HttpRuntime
        (asynchronously). Patch from Joshua Tauberer <[EMAIL PROTECTED]>,
        thanks!


Modified: trunk/xsp/ChangeLog
===================================================================
--- trunk/xsp/ChangeLog 2007-08-09 08:20:02 UTC (rev 83716)
+++ trunk/xsp/ChangeLog 2007-08-09 08:28:12 UTC (rev 83717)
@@ -1,3 +1,11 @@
+2007-08-09  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * src/ModMonoWorker.cs: move request unregister call from the
+       finally block to the catch block. This is to avoid unregistering
+       the request while it is still being processed by the HttpRuntime
+       (asynchronously). Patch from Joshua Tauberer <[EMAIL PROTECTED]>,
+       thanks!
+
 2007-08-08  Marek Habersack  <[EMAIL PROTECTED]>
 
        * src/Mono.WebServer/MonoWorkerRequest.cs: don't use the

Modified: trunk/xsp/src/ModMonoWorker.cs
===================================================================
--- trunk/xsp/src/ModMonoWorker.cs      2007-08-09 08:20:02 UTC (rev 83716)
+++ trunk/xsp/src/ModMonoWorker.cs      2007-08-09 08:28:12 UTC (rev 83717)
@@ -1,5 +1,5 @@
 //
-// Mono.WebServer.ModMonoApplicationHost
+// Mono.WebServer.ModMonoWorker
 //
 // Authors:
 //     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
@@ -61,15 +61,14 @@
                {
                        try {
                                InnerRun (state);
-                       } catch (FileNotFoundException fnf) {
-                               // We print this one, as it might be a sign of 
a bad deployment
-                               // once we require the .exe and Mono.WebServer 
in bin or the GAC.
-                               Console.Error.WriteLine (fnf);
-                       } catch (IOException) {
-                               // This is ok (including EndOfStreamException)
                        } catch (Exception e) {
+                               // FileNotFoundException might be a sign of a 
bad deployment
+                               // once we require the .exe and Mono.WebServer 
in bin or the GAC.
+
+                               // IOException, like EndOfStreamException, 
might be ok.
+
                                Console.Error.WriteLine (e);
-                       } finally {
+
                                try {
                                        // Closing is enough for mod_mono. the 
module will return a 50x
                                        if (Stream != null){
@@ -207,17 +206,17 @@
                        requestId = broker.RegisterRequest (this);
                        
                        host.ProcessRequest (requestId, 
-                                                               
modRequest.GetHttpVerbName(), 
-                                                               
modRequest.GetQueryString(), 
-                                                               
modRequest.GetUri(), 
-                                                               
modRequest.GetProtocol(), 
-                                                               
modRequest.GetLocalAddress(), 
-                                                               
modRequest.GetServerPort(), 
-                                                               
modRequest.GetRemoteAddress(), 
-                                                               
modRequest.GetRemotePort(), 
-                                                               
modRequest.GetRemoteName(), 
-                                                               
modRequest.GetAllHeaders(),
-                                                               
modRequest.GetAllHeaderValues());
+                                            modRequest.GetHttpVerbName(), 
+                                            modRequest.GetQueryString(), 
+                                            modRequest.GetUri(), 
+                                            modRequest.GetProtocol(), 
+                                            modRequest.GetLocalAddress(), 
+                                            modRequest.GetServerPort(), 
+                                            modRequest.GetRemoteAddress(), 
+                                            modRequest.GetRemotePort(), 
+                                            modRequest.GetRemoteName(), 
+                                            modRequest.GetAllHeaders(),
+                                            modRequest.GetAllHeaderValues());
                }
 
                void OnUnregisterRequest (object sender, 
UnregisterRequestEventArgs args)

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

Reply via email to