]> granicus.if.org Git - apache/commitdiff
fix problem where a unmatched tag was not sent if it was at the
authorIan Holsman <ianh@apache.org>
Thu, 21 Feb 2002 16:18:11 +0000 (16:18 +0000)
committerIan Holsman <ianh@apache.org>
Thu, 21 Feb 2002 16:18:11 +0000 (16:18 +0000)
end of a bucket

Obtained from: Alla Teper noticed it
Submitted by:
Reviewed by: Cliff/Justin

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

CHANGES
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 3137ee7ac44979a16e4e189ba34ac44414a8acc4..127ca8ec21f2478e91f82cb0a897004385a3054b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.33-dev
 
+  *) fix bug in mod-include where it wouldn't send a unmatched
+     part if it was at the end of a bucket [Ian Holsman]
+
   *) worker MPM: Improve logging of errors with the interface between
      the listener thread and worker threads.  [Jeff Trawick]
 
index 6d0cc45106cb90f164360614e863342f52af8137..2f1cd5eff5ac160384eaa202166e8bff20d4f74f 100644 (file)
@@ -429,7 +429,18 @@ static apr_bucket *find_start_sequence(apr_bucket *dptr, include_ctx_t *ctx,
                 return found_start_sequence(dptr, ctx, c - buf);
             }
 
-            /* False alarm... */
+            /* False alarm... 
+             * send out the unmatched part
+             */
+            if (ctx->parse_pos > 0) {
+                apr_bucket *tmp_buck;
+                tmp_buck = apr_bucket_pool_create(apr_pstrndup(ctx->pool,
+                                                               ctx->start_seq,
+                                                               ctx->parse_pos),
+                                                  ctx->parse_pos, 
+                                                  ctx->pool);
+                APR_BUCKET_INSERT_BEFORE(dptr, tmp_buck);
+            }
             ctx->state = PRE_HEAD;
         }