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/server protocol.c
Date Sun, 12 May 2002 00:57:33 GMT
brianp      02/05/11 17:57:33

  Modified:    server   protocol.c
  Log:
  Optimization: Replaced apr_strcat() with apr_strcatv() in
  ap_make_content_type()
  
  Revision  Changes    Path
  1.100     +8 -2      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- protocol.c	10 May 2002 06:47:13 -0000	1.99
  +++ protocol.c	12 May 2002 00:57:33 -0000	1.100
  @@ -169,8 +169,14 @@
            */
           for (pcset = needcset_patterns; *pcset ; pcset++) {
               if (apr_strmatch(*pcset, type, type_len) != NULL) {
  -                type = apr_pstrcat(r->pool, type, "; charset=",
  -                                   conf->add_default_charset_name, NULL);
  +                struct iovec concat[3];
  +                concat[0].iov_base = (void *)type;
  +                concat[0].iov_len = type_len;
  +                concat[1].iov_base = (void *)"; charset=";
  +                concat[1].iov_len = sizeof("; charset=") - 1;
  +                concat[2].iov_base = (void *)(conf->add_default_charset_name);
  +                concat[2].iov_len = strlen(conf->add_default_charset_name);
  +                type = apr_pstrcatv(r->pool, concat, 3, NULL);
                   break;
               }
           }
  
  
  

Mime
View raw message