]> granicus.if.org Git - apache/commitdiff
baby steps
authorIan Holsman <ianh@apache.org>
Sun, 24 Feb 2002 00:34:14 +0000 (00:34 +0000)
committerIan Holsman <ianh@apache.org>
Sun, 24 Feb 2002 00:34:14 +0000 (00:34 +0000)
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

index c6880ba9cd8b6d34a856635ecef2f2be4644e9f1..31199e2f4786760b4e4f328a599ac861cde8510c 100644 (file)
@@ -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... 
              */