httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Tue, 07 Nov 2000 18:09:49 GMT
rbb         00/11/07 10:09:48

  Modified:    src/main http_protocol.c
  Log:
  Remove the original ap_send_fd code.  The filters have been working for a
  while, and this is cluttering up the code.  If it is really needed, it
  can be found in CVS
  
  Revision  Changes    Path
  1.230     +0 -74     apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.229
  retrieving revision 1.230
  diff -u -r1.229 -r1.230
  --- http_protocol.c	2000/11/07 12:18:45	1.229
  +++ http_protocol.c	2000/11/07 18:09:47	1.230
  @@ -2751,80 +2751,6 @@
   
       return rv;
   }
  -#if 0
  -/* Leave the old implementation around temporarily for reference purposes */
  -AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, 
  -                                   apr_size_t length, apr_size_t *nbytes) 
  -{
  -    apr_status_t rv = APR_SUCCESS;
  -    apr_size_t total_bytes_sent = 0;
  -    register int o;
  -    apr_ssize_t n;
  -    char buf[IOBUFSIZE];
  -
  -    if ((length == 0) || r->connection->aborted) {
  -        *nbytes = 0;
  -        return APR_SUCCESS;
  -    }
  -
  -#if APR_HAS_SENDFILE
  -    /* Chunked encoding must be handled in the BUFF */
  -    if (!r->chunked) {
  -        rv = static_send_file(fd, r, offset, length, &total_bytes_sent);
  -        if (rv == APR_SUCCESS) {
  -            r->bytes_sent += total_bytes_sent;
  -            *nbytes = total_bytes_sent;
  -            return rv;
  -        }
  -        /* Don't consider APR_ENOTIMPL a failure */
  -        if (rv != APR_ENOTIMPL) {
  -            check_first_conn_error(r, "send_fd", rv);
  -            r->bytes_sent += total_bytes_sent;
  -            *nbytes = total_bytes_sent;
  -            return rv;
  -        }
  -    }
  -#endif
  -
  -    /* Either sendfile is not defined or it failed with APR_ENOTIMPL */
  -    if (offset) {
  -        /* Seek the file to the offset */
  -        rv = apr_seek(fd, APR_SET, &offset);
  -        if (rv != APR_SUCCESS) {
  -            *nbytes = total_bytes_sent;
  -            /* apr_close(fd); close the file or let the caller handle it? */
  -            return rv;
  -        }
  -    }
  -
  -    while (!r->connection->aborted) {
  -        if ((length > 0) && (total_bytes_sent + IOBUFSIZE) > length) {
  -            n = length - total_bytes_sent;
  -	}
  -        else {
  -            n = IOBUFSIZE;
  -	}
  -        
  -        do {
  -            rv = apr_read(fd, buf, &n);
  -        } while (APR_STATUS_IS_EINTR(rv) && !r->connection->aborted);
  -
  -        /* Is this still the right check? maybe check for n==0 or rv == APR_EOF? */
  -        if (n < 1) {
  -            break;
  -        }
  -
  -        o = ap_rwrite(buf, n, r);
  -        if (o < 0) {
  -            break;
  -	}
  -        total_bytes_sent += o;
  -    }
  -
  -    *nbytes = total_bytes_sent;
  -    return rv;
  -} 
  -#endif
   
   #ifdef AP_USE_MMAP_FILES
   
  
  
  

Mime
View raw message