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/http http_protocol.c
Date Sun, 12 May 2002 01:18:29 GMT
brianp      02/05/11 18:18:29

  Modified:    modules/http http_protocol.c
  Log:
  Optimization: replaced apr_pstrcat+apr_strlen with apr_pstrcatv in
  basic_http_header()
  
  Revision  Changes    Path
  1.419     +10 -2     httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.418
  retrieving revision 1.419
  diff -u -r1.418 -r1.419
  --- http_protocol.c	8 May 2002 02:17:04 -0000	1.418
  +++ http_protocol.c	12 May 2002 01:18:28 -0000	1.419
  @@ -1066,6 +1066,7 @@
       const char *server;
       header_struct h;
       apr_size_t len;
  +    struct iovec vec[4];
   
       if (r->assbackwards) {
           /* there are no headers to send */
  @@ -1074,8 +1075,15 @@
   
       /* Output the HTTP/1.x Status-Line and the Date and Server fields */
   
  -    tmp = apr_pstrcat(r->pool, protocol, " ", r->status_line, CRLF, NULL);
  -    len = strlen(tmp);
  +    vec[0].iov_base = (void *)protocol;
  +    vec[0].iov_len  = strlen(protocol);
  +    vec[1].iov_base = (void *)" ";
  +    vec[1].iov_len  = sizeof(" ") - 1;
  +    vec[2].iov_base = (void *)(r->status_line);
  +    vec[2].iov_len  = strlen(r->status_line);
  +    vec[3].iov_base = (void *)CRLF;
  +    vec[3].iov_len  = sizeof(CRLF) - 1;
  +    tmp = apr_pstrcatv(r->pool, vec, 4, &len);
       ap_xlate_proto_to_ascii(tmp, len);
       apr_brigade_write(bb, NULL, NULL, tmp, len);
   
  
  
  

Mime
View raw message