From 13f6719a121c2aa945168585c446e160594b8f7d Mon Sep 17 00:00:00 2001 From: Ian Holsman Date: Sun, 24 Feb 2002 00:34:14 +0000 Subject: [PATCH] baby steps this fixes the case where we have a SSI start tag split up over multiple buckets. BTW HTTPD-test is failing. but it was failing on 2.0.32 version of mod-include as well PR: Obtained from: Submitted by: Brian Pane Reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93555 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_include.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index c6880ba9cd..31199e2f47 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -422,7 +422,7 @@ static apr_bucket *find_start_sequence(apr_bucket *dptr, include_ctx_t *ctx, if (ctx->state == PARSE_HEAD) { apr_size_t tmpLen; - tmpLen = (len > (slen - 1)) ? len : (slen - 1); + tmpLen = (len < (slen - 1)) ? len : (slen - 1); while (c < buf + tmpLen && *c == str[ctx->parse_pos]) { @@ -435,6 +435,10 @@ static apr_bucket *find_start_sequence(apr_bucket *dptr, include_ctx_t *ctx, ctx->bytes_parsed += c - buf; return found_start_sequence(dptr, ctx, c - buf); } + else if (c == buf + tmpLen) { + dptr = APR_BUCKET_NEXT(dptr); + continue; + } /* False alarm... */ -- 2.50.1