Author: gonzalo
Date: 2005-03-18 17:29:03 -0500 (Fri, 18 Mar 2005)
New Revision: 42022
Modified:
trunk/xsp/ChangeLog
trunk/xsp/server/ApplicationServer.cs
trunk/xsp/server/IWebSource.cs
trunk/xsp/server/ModMonoApplicationHost.cs
trunk/xsp/server/XSPApplicationHost.cs
Log:
2005-03-18 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* server/ModMonoApplicationHost.cs: the lockfile is to be removed even
for TCP sockets. Also return immediately if the module wants us to
die.
* server/ApplicationServer.cs: call Dispose on the web source so that
removing the lockfile and the unix socket is done asap.
* server/XSPApplicationHost.cs: added empty Dispose().
* server/IWebSource.cs: IWebSource inherits from IDisposable now.
This fixes bug #73619.
Modified: trunk/xsp/ChangeLog
===================================================================
--- trunk/xsp/ChangeLog 2005-03-18 22:22:53 UTC (rev 42021)
+++ trunk/xsp/ChangeLog 2005-03-18 22:29:03 UTC (rev 42022)
@@ -1,5 +1,19 @@
2005-03-18 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+ * server/ModMonoApplicationHost.cs: the lockfile is to be removed even
+ for TCP sockets. Also return immediately if the module wants us to
+ die.
+
+ * server/ApplicationServer.cs: call Dispose on the web source so that
+ removing the lockfile and the unix socket is done asap.
+
+ * server/XSPApplicationHost.cs: added empty Dispose().
+ * server/IWebSource.cs: IWebSource inherits from IDisposable now.
+
+ This fixes bug #73619.
+
+2005-03-18 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
* server/InitialWorkerRequest.cs: prevent empty lines before the
actual request from causing an error. Fixes bug #73048.
Modified: trunk/xsp/server/ApplicationServer.cs
===================================================================
--- trunk/xsp/server/ApplicationServer.cs 2005-03-18 22:22:53 UTC (rev
42021)
+++ trunk/xsp/server/ApplicationServer.cs 2005-03-18 22:29:03 UTC (rev
42022)
@@ -273,10 +273,12 @@
{
if (!started)
throw new InvalidOperationException ("The
server is not started.");
+
if (stop)
return; // Just ignore, as we're already
stopping
stop = true;
+ webSource.Dispose ();
ThreadPool.QueueUserWorkItem (new WaitCallback
(RealStop));
}
Modified: trunk/xsp/server/IWebSource.cs
===================================================================
--- trunk/xsp/server/IWebSource.cs 2005-03-18 22:22:53 UTC (rev 42021)
+++ trunk/xsp/server/IWebSource.cs 2005-03-18 22:29:03 UTC (rev 42022)
@@ -34,7 +34,7 @@
namespace Mono.ASPNET
{
- public interface IWebSource
+ public interface IWebSource : IDisposable
{
Socket CreateSocket ();
IWorker CreateWorker (Socket client, ApplicationServer server);
@@ -51,3 +51,4 @@
void Flush ();
}
}
+
Modified: trunk/xsp/server/ModMonoApplicationHost.cs
===================================================================
--- trunk/xsp/server/ModMonoApplicationHost.cs 2005-03-18 22:22:53 UTC (rev
42021)
+++ trunk/xsp/server/ModMonoApplicationHost.cs 2005-03-18 22:29:03 UTC (rev
42022)
@@ -144,11 +144,13 @@
filename = null;
if (file_bound)
File.Delete (f);
+ }
- if (locker != null) {
- locker.Close ();
- File.Delete (lockfile);
- }
+ if (locker != null) {
+ Stream l = locker;
+ locker = null;
+ l.Close ();
+ File.Delete (lockfile);
}
}
@@ -223,8 +225,11 @@
try {
RequestReader rr = new RequestReader (Stream);
- if (rr.ShuttingDown)
+ if (rr.ShuttingDown) {
server.Stop ();
+ Close ();
+ return;
+ }
string vhost = rr.Request.GetRequestHeader
("Host");
int port = -1;
Modified: trunk/xsp/server/XSPApplicationHost.cs
===================================================================
--- trunk/xsp/server/XSPApplicationHost.cs 2005-03-18 22:22:53 UTC (rev
42021)
+++ trunk/xsp/server/XSPApplicationHost.cs 2005-03-18 22:29:03 UTC (rev
42022)
@@ -88,6 +88,10 @@
{
return new XSPRequestBroker ();
}
+
+ public void Dispose ()
+ {
+ }
}
//
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches