httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Fri, 21 Nov 2003 15:02:04 GMT
trawick     2003/11/21 07:02:04

  Modified:    .        CHANGES
               server   core.c
  Log:
  Account for some bytes handed to the network layer prior to
  dropped connections.
  
  Such bytes were counted on some paths but not on others.  If
  these bytes are to be counted in some error paths, they should
  be counted in the others.  We don't know if they were actually
  presented to the client.
  
  AFAIK, this only affects mod_logio.
  
  Revision  Changes    Path
  1.1320    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1319
  retrieving revision 1.1320
  diff -u -r1.1319 -r1.1320
  --- CHANGES	21 Nov 2003 03:49:12 -0000	1.1319
  +++ CHANGES	21 Nov 2003 15:02:04 -0000	1.1320
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_logio: Account for some bytes handed to the network layer prior to
  +     dropped connections.  [Jeff Trawick]
  +
     *) Fix a problem with the display of empty variables ("SetEnv foo") in
        mod_include.  PR 24734  [Markus Julen <mj zermatt.net>]
   
  
  
  
  1.252     +4 -7      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.251
  retrieving revision 1.252
  diff -u -r1.251 -r1.252
  --- core.c	21 Nov 2003 03:29:11 -0000	1.251
  +++ core.c	21 Nov 2003 15:02:04 -0000	1.252
  @@ -2846,12 +2846,11 @@
       /* XXX handle checking for non-blocking socket */
       while (bytes_written != len) {
           rv = apr_socket_sendv(s, vec + i, nvec - i, &n);
  +        *nbytes += n;
           bytes_written += n;
           if (rv != APR_SUCCESS)
               return rv;
   
  -        *nbytes += n;
  -
           /* If the write did not complete, adjust the iovecs and issue
            * apr_socket_sendv again
            */
  @@ -3002,8 +3001,7 @@
   
           rv = writev_it_all(c->client_socket, hdtr->headers, hdtr->numheaders,
                              sendlen, &bytes_sent);
  -        if (rv == APR_SUCCESS)
  -            *nbytes += bytes_sent;     /* track total bytes sent */
  +        *nbytes += bytes_sent;     /* track total bytes sent */
       }
   
       /* Seek the file to 'offset' */
  @@ -3020,10 +3018,10 @@
           while (rv == APR_SUCCESS && sendlen) {
               bytes_sent = sendlen;
               rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
  +            *nbytes += bytes_sent;
               if (rv == APR_SUCCESS) {
                   sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
                   o += bytes_sent;       /* o is where we are in the buffer */
  -                *nbytes += bytes_sent;
                   togo -= bytes_sent;    /* track how much of the file we've sent */
               }
           }
  @@ -3040,8 +3038,7 @@
           }
           rv = writev_it_all(c->client_socket, hdtr->trailers, hdtr->numtrailers,
                              sendlen, &bytes_sent);
  -        if (rv == APR_SUCCESS)
  -            *nbytes += bytes_sent;
  +        *nbytes += bytes_sent;
       }
   
       return rv;
  
  
  

Mime
View raw message