]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix a bug in the APR_MODE_EXHAUSTIVE mode for the core input filter.
authorAaron Bannert <aaron@apache.org>
Wed, 6 Mar 2002 18:03:19 +0000 (18:03 +0000)
committerAaron Bannert <aaron@apache.org>
Wed, 6 Mar 2002 18:03:19 +0000 (18:03 +0000)
This patch changes nothing outside of that mode.

Also, why do we ever call apr_brigade_length() in the core? This doesn't
seem right to me, so here's a comment above the other call.

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

server/core.c

index 4f95f37c20578be1db26bad975882f3625586ab0..7d95e1f0299ea0422ea4a5eb4b70409c735d08e5 100644 (file)
@@ -3389,11 +3389,13 @@ static int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
      */
     if (mode == AP_MODE_EXHAUSTIVE) {
         apr_bucket *e;
-        apr_off_t total;
 
-        /* Force a recompute of the length and force a read-all */
-        apr_brigade_length(ctx->b, 1, &total);
+        /* Tack on any buckets that were set aside. */
         APR_BRIGADE_CONCAT(b, ctx->b);
+
+        /* Since we've just added all potential buckets (which will most
+         * likely simply be the socket bucket) we know this is the end,
+         * so tack on an EOS too. */
         /* We have read until the brigade was empty, so we know that we
          * must be EOS. */
         e = apr_bucket_eos_create();
@@ -3463,6 +3465,7 @@ static int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
         /* Take what was originally there and place it back on ctx->b */
         APR_BRIGADE_CONCAT(ctx->b, newbb);
 
+        /* XXX: Why is this here? We never use 'total'! */
         apr_brigade_length(b, 1, &total);
 
         return APR_SUCCESS;