httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <stodd...@locus.apache.org>
Subject cvs commit: apache-2.0/src/modules/standard mod_file_cache.c
Date Thu, 06 Jul 2000 15:56:48 GMT
stoddard    00/07/06 08:56:46

  Modified:    src/modules/standard mod_file_cache.c
  Log:
  Do not set the sendfile flag to disconnect the socket when sending byteranges.
  Thanks to Jeff Trawick for pointing this one out.
  
  Revision  Changes    Path
  1.15      +9 -7      apache-2.0/src/modules/standard/mod_file_cache.c
  
  Index: mod_file_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_file_cache.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_file_cache.c	2000/07/06 15:13:30	1.14
  +++ mod_file_cache.c	2000/07/06 15:56:45	1.15
  @@ -423,13 +423,6 @@
       ap_hdtr_t *phdtr = &hdtr;
       ap_int32_t flags = 0;
   
  -    if (!r->connection->keepalive) {
  -        /* Prepare the socket to be reused. Ignored on systems
  -         * that do not support reusing the accept socket
  -         */
  -        flags |= APR_SENDFILE_DISCONNECT_SOCKET;
  -    }
  -
       /* 
        * We want to send any data held in the client buffer on the
        * call to iol_sendfile. So hijack it then set outcnt to 0
  @@ -449,6 +442,15 @@
   
       if (!rangestatus) {
           length = file->finfo.size;
  +
  +        if (!r->connection->keepalive) {
  +            /* Disconnect the socket after the send completes. This
  +             * should leave the accept socket in a state ready to be
  +             * reused for the next connection.
  +             */
  +            flags |= APR_SENDFILE_DISCONNECT_SOCKET;
  +        }
  +
           iol_sendfile(r->connection->client->iol,
                        file->file,
                        phdtr,
  
  
  

Mime
View raw message