]> granicus.if.org Git - apache/commitdiff
I learned about AP_MODE_EXHAUSTIVE while reading some of the new filter
authorRyan Bloom <rbb@apache.org>
Mon, 25 Feb 2002 06:54:40 +0000 (06:54 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 25 Feb 2002 06:54:40 +0000 (06:54 +0000)
code earlier today.  With this mode, the Perchild MPM can finally be
fixed to work with filters.  I have changed a comment in the core to make
it clear that this mode is required, but I have mentioned how dangerous
this mode is.  Also add a comment to STATUS about my plans.

Hopefully I'll have some time this week to hack through the MPM.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93565 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/core.c

diff --git a/STATUS b/STATUS
index 3d7cb94df81cddcad7aed6951e0d0cb074f17753..9eb5038b171cf4475de33717a68184713aa0ab25 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2002/02/24 16:20:01 $]
+Last modified at [$Date: 2002/02/25 06:54:40 $]
 
 Release:
 
@@ -127,6 +127,13 @@ CURRENT VOTES:
 
 RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
 
+    * With AP_MODE_EXHAUSTIVE in the core, it is finally clear to me
+      how the Perchild MPM should be re-written.  It hasn't worked
+      correctly since filters were added because it wasn't possible to
+      get the content that had already been written and the socket at
+      the same time.  This mode lets us do that, so the MPM can be
+      fixed.
+
     * htpasswd blindly processes the file you give it, and does no
       sanity checking before totally corrupting whatever file it was
       you thought you had. It should check the input file and bail
index 07fbd7bf11a4cb9395822ca12c83c4a8f3bfb3c1..899f3ffdd3aaaeba1fa0da49521238f8ca08e760 100644 (file)
@@ -3266,14 +3266,16 @@ static int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
         }
     }
 
-    /* If readbytes is -1, we want to just read everything until the end
-     * of the brigade, which in this case means the end of the socket.  To
-     * do this, we loop through the entire brigade, until the socket is
-     * exhausted, at which point, it will automagically remove itself from
-     * the brigade.
-     * ### No one in their right mind should be calling this with -1.
-     *     This is just an all-around bad idea.  We may be better off by 
-     *     just closing the socket.  Determine whether anyone uses this.
+    /* If mode is EXHAUSTIVE, we want to just read everything until the end
+     * of the brigade, which in this case means the end of the socket.
+     * To do this, we attach the brigade that has currently been setaside to
+     * the brigade that was passed down, and send that brigade back.
+     * 
+     * NOTE:  This is VERY dangerous to use, and should only be done with
+     * extreme caution.  However, the Perchild MPM needs this feature
+     * if it is ever going to work correctly again.  With this, the Perchild
+     * MPM can easily request the socket and all data that has been read,
+     * which means that it can pass it to the correct child process.
      */
     if (mode == AP_MODE_EXHAUSTIVE) {
         apr_bucket *e;