httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Sun, 02 Dec 2001 19:16:02 GMT
brianp      01/12/02 11:16:02

  Modified:    modules/filters mod_include.c
  Log:
  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)
  
  Revision  Changes    Path
  1.163     +5 -1      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- mod_include.c	2001/12/02 18:44:06	1.162
  +++ mod_include.c	2001/12/02 19:16:01	1.163
  @@ -794,7 +794,11 @@
       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++;
       }
  
  
  

Mime
View raw message