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-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3275cee1c56121c76ef84666ae5504f2e545942;p=apache 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 98dac76886..1a3eac5ce2 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++; }