]> granicus.if.org Git - apache/commitdiff
Another optimization for find_end_sequence: once we're in the
authorBrian Pane <brianp@apache.org>
Sun, 17 Mar 2002 06:31:22 +0000 (06:31 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 17 Mar 2002 06:31:22 +0000 (06:31 +0000)
middle of parsing a tag, consume the entire tag in a quick loop,
rather than jumping back to the outer state-machine loop for
each character

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

modules/filters/mod_include.c

index 7ae98c2fea00e45b09bc9910277c58c9dab47248..8476b75b4ecf9f73f119a745994572a9493b226d 100644 (file)
@@ -626,7 +626,12 @@ static apr_bucket *find_end_sequence(apr_bucket *dptr, include_ctx_t *ctx,
                     }
                 }
                 else if (ctx->state == PARSE_TAG) {
-                    ctx->tag_length++;
+                    const char *tmp = c;
+                    do {
+                        c++;
+                    } while ((c < buf + len) && (*c != *str));
+                    ctx->tag_length += (c - tmp);
+                    continue;
                 }
                 else {
                     if (ctx->parse_pos != 0) {