Author: gonzalo
Date: 2005-03-18 14:31:44 -0500 (Fri, 18 Mar 2005)
New Revision: 42006

Modified:
   trunk/xsp/ChangeLog
   trunk/xsp/server/InitialWorkerRequest.cs
Log:
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/ChangeLog
===================================================================
--- trunk/xsp/ChangeLog 2005-03-18 19:30:53 UTC (rev 42005)
+++ trunk/xsp/ChangeLog 2005-03-18 19:31:44 UTC (rev 42006)
@@ -1,3 +1,8 @@
+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.
+
 2005-03-05 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * server/ModMonoApplicationHost.cs: don't print the exception to apache

Modified: trunk/xsp/server/InitialWorkerRequest.cs
===================================================================
--- trunk/xsp/server/InitialWorkerRequest.cs    2005-03-18 19:30:53 UTC (rev 
42005)
+++ trunk/xsp/server/InitialWorkerRequest.cs    2005-03-18 19:31:44 UTC (rev 
42006)
@@ -178,14 +178,23 @@
                {
                        string req = null;
                        try {
-                               req = ReadLine ();
+                               while (true) {
+                                       req = ReadLine ();
+                                       if (req == null) {
+                                               gotSomeInput = false;
+                                               return false;
+                                       }
+
+                                       req = req.Trim ();
+                                       // Ignore empty lines before the actual 
request.
+                                       if (req != "")
+                                               break;
+                               }
                        } catch {
+                               gotSomeInput = false;
+                               return false;
                        }
 
-                       if (req == null)
-                               return false;
-
-                       req = req.Trim ();
                        string [] s = req.Split (' ');
 
                        switch (s.Length) {

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

Reply via email to