From: Brian Pane Date: Sun, 17 Mar 2002 06:31:22 +0000 (+0000) Subject: Another optimization for find_end_sequence: once we're in the X-Git-Tag: CHANGES~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=908c6dec7546c38b9ebe8bdef7036aaf175cdf89;p=thirdparty%2Fapache%2Fhttpd.git Another optimization for find_end_sequence: once we're in the 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 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 7ae98c2fea0..8476b75b4ec 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -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) {