tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
Date Thu, 23 Dec 2004 05:54:40 GMT
Wait - you mean to tell me instead of converting the hostname
once to lower - we are strcasecmp'ing every time?  Outch, that 
hurts.

Bill

At 09:14 PM 12/16/2004, billbarker@apache.org wrote:
>billbarker    2004/12/16 19:14:56
>
>  Modified:    jk/native/apache-1.3 mod_jk.c
>               jk/native/apache-2.0 mod_jk.c
>  Log:
>  Now that the SC lookup is case-insensitive, don't waste cycles converting the header
names to lower case
>  
>  Revision  Changes    Path
>  1.60      +2 -6      jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
>  
>  Index: mod_jk.c
>  ===================================================================
>  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
>  retrieving revision 1.59
>  retrieving revision 1.60
>  diff -u -r1.59 -r1.60
>  --- mod_jk.c  13 Dec 2004 09:11:24 -0000      1.59
>  +++ mod_jk.c  17 Dec 2004 03:14:56 -0000      1.60
>  @@ -592,12 +592,8 @@
>                   char *hname = ap_pstrdup(r->pool, elts[i].key);
>                   s->headers_values[i] = ap_pstrdup(r->pool, elts[i].val);
>                   s->headers_names[i] = hname;
>  -                while (*hname) {
>  -                    *hname = tolower(*hname);
>  -                    hname++;
>  -                }
>                   if (need_content_length_header &&
>  -                    !strncmp(s->headers_values[i], "content-length", 14)) {
>  +                    !strcasecmp(s->headers_values[i], "content-length")) {
>                       need_content_length_header = JK_FALSE;
>                   }
>               }
>  
>  
>  
>  1.110     +2 -6      jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
>  
>  Index: mod_jk.c
>  ===================================================================
>  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
>  retrieving revision 1.109
>  retrieving revision 1.110
>  diff -u -r1.109 -r1.110
>  --- mod_jk.c  13 Dec 2004 09:10:31 -0000      1.109
>  +++ mod_jk.c  17 Dec 2004 03:14:56 -0000      1.110
>  @@ -636,12 +636,8 @@
>                   char *hname = apr_pstrdup(r->pool, elts[i].key);
>                   s->headers_values[i] = apr_pstrdup(r->pool, elts[i].val);
>                   s->headers_names[i] = hname;
>  -                while (*hname) {
>  -                    *hname = tolower(*hname);
>  -                    hname++;
>  -                }
>                   if (need_content_length_header &&
>  -                    !strncmp(s->headers_values[i], "content-length", 14)) {
>  +                    !strcasecmp(s->headers_values[i], "content-length")) {
>                       need_content_length_header = JK_FALSE;
>                   }
>               }
>  
>  
>  
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message