From: Brian Pane Date: Sun, 2 Dec 2001 19:16:01 +0000 (+0000) Subject: Added code to ap_ssi_get_tag_and_value() to avoid converting X-Git-Tag: 2.0.30~307 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de43f42fb2f5f643435307359e074923258350a7;p=thirdparty%2Fapache%2Fhttpd.git Added code to ap_ssi_get_tag_and_value() to avoid converting SSI tags to lowercase when they're already lowercase (in my experience, this special case happens often enough to be worth optimizing) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92286 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 98dac768861..1a3eac5ce22 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -794,7 +794,11 @@ static void ap_ssi_get_tag_and_value(include_ctx_t *ctx, char **tag, SKIP_TAG_WHITESPACE(c); *tag = c; /* First non-whitespace character (could be NULL). */ - while ((*c != '\0') && (*c != '=') && (!apr_isspace(*c))) { + while (apr_islower(*c)) { + c++; /* Optimization for the common case where the tag */ + } /* is already lowercase */ + + while ((*c != '=') && (!apr_isspace(*c)) && (*c != '\0')) { *c = apr_tolower(*c); /* find end of tag, lowercasing as we go... */ c++; }