From: Ian Holsman Date: Thu, 21 Feb 2002 16:18:11 +0000 (+0000) Subject: fix problem where a unmatched tag was not sent if it was at the X-Git-Tag: 2.0.33~166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3cd5f06e2e1533aef5aa4db3a7a3eed6b4ad5c4;p=apache fix problem where a unmatched tag was not sent if it was at the 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 --- diff --git a/CHANGES b/CHANGES index 3137ee7ac4..127ca8ec21 100644 --- 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] diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 6d0cc45106..2f1cd5eff5 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -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; }