You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/08/23 02:01:59 UTC

cvs commit: apache-2.0/src/modules/standard mod_cgi.c mod_cgid.c mod_include.c mod_mime_magic.c

rbb         00/08/22 17:01:58

  Modified:    src      CHANGES
               src/include ap_mpm.h buff.h
               src/main Makefile.in buff.c http_core.c http_protocol.c
               src/modules/mpm/beos beos.c
               src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_beos mpmt_beos.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/mpm/perchild perchild.c
               src/modules/mpm/prefork prefork.c
               src/modules/mpm/spmt_os2 spmt_os2.c
               src/modules/mpm/winnt mpm_winnt.c
               src/modules/proxy proxy_connect.c proxy_ftp.c proxy_http.c
               src/modules/standard mod_cgi.c mod_cgid.c mod_include.c
                        mod_mime_magic.c
  Log:
  Remove IOLs from Apache.  They are no longer necessary, now that we have
  filtering beginning to work.  There is a hack that has been repeated
  through this patch, we morph a pipe into a socket, and put the socket
  into the BUFF.  Everytime we do that, we are working with a pipe from
  a CGI, and we should be creating a pipe bucket and passing that bucket
  back.  Because we don't actually have pipe buckets yet, we are using this
  hack.  When we get pipe buckets, this will be fixed.
  
  Revision  Changes    Path
  1.212     +3 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.211
  retrieving revision 1.212
  diff -u -r1.211 -r1.212
  --- CHANGES	2000/08/22 21:55:33	1.211
  +++ CHANGES	2000/08/23 00:01:51	1.212
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0a7
   
  +  *) Remove IOLs from Apache.  With filtering, IOLs are no longer necessary
  +     [Ryan Bloom]
  +
     *) Add tables with non-string/binary values to APR.
        [Ken Coar]
   
  
  
  
  1.16      +1 -1      apache-2.0/src/include/ap_mpm.h
  
  Index: ap_mpm.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/ap_mpm.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ap_mpm.h	2000/08/02 05:25:27	1.15
  +++ ap_mpm.h	2000/08/23 00:01:51	1.16
  @@ -98,7 +98,7 @@
       unix/posix notes:
       - The MPM does not set a SIGALRM handler, user code may use SIGALRM.
   	But the preferred method of handling timeouts is to use the
  -	timeouts provided by the BUFF/iol abstraction.
  +	timeouts provided by the BUFF abstraction.
       - The proper setting for SIGPIPE is SIG_IGN, if user code changes it
           for any of their own processing, it must be restored to SIG_IGN
   	prior to executing or returning to any apache code.
  
  
  
  1.35      +4 -5      apache-2.0/src/include/buff.h
  
  Index: buff.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/buff.h,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- buff.h	2000/08/07 19:25:59	1.34
  +++ buff.h	2000/08/23 00:01:51	1.35
  @@ -66,7 +66,6 @@
   #ifdef APR_HAVE_STDARG_H
   #include <stdarg.h>
   #endif
  -#include "ap_iol.h"
   #include "apr_lib.h"
   #include "apr_general.h"
   #ifdef APACHE_XLATE
  @@ -168,7 +167,7 @@
   
       apr_pool_t *pool;
   
  -    ap_iol *iol;
  +    apr_socket_t *bsock;
   #ifdef APACHE_XLATE
       b_read_ops b_read_ops;      /* some read operations are replaced when 
                                    * translation is on */
  @@ -199,7 +198,7 @@
   #define BO_BYTECT (1)
   /* XXX: timeouts should probably be redefined to be in microseconds to match APR */
   /* timeout values have the same semantics as those documented for timeouts
  -   in ap_iol.h... that is:
  +   in apr_socket.h... that is:
      timeout < 0 is blocking infinite/no-timeout
      timeout == 0 is non-blocking
      timeout > 0 is blocking with timeout after the indicated number of seconds
  @@ -222,8 +221,8 @@
   /* Stream creation and modification */
   API_EXPORT(BUFF *) ap_bcreate(apr_pool_t *p, int flags);
   
  -API_EXPORT(void) ap_bpush_iol(BUFF *fb, ap_iol *iol);
  -API_EXPORT(void) ap_bpop_iol(ap_iol **iol, BUFF *fb);
  +API_EXPORT(void) ap_bpush_socket(BUFF *fb, apr_socket_t *sock);
  +API_EXPORT(void) ap_bpop_socket(apr_socket_t **sock, BUFF *fb);
   
   /* XXX - unused right now - mvsk */
   API_EXPORT(BUFF *) ap_bopenf(apr_pool_t *a, const char *name, int flg, int mode);
  
  
  
  1.18      +1 -1      apache-2.0/src/main/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/Makefile.in,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Makefile.in	2000/07/28 20:31:00	1.17
  +++ Makefile.in	2000/08/23 00:01:52	1.18
  @@ -7,7 +7,7 @@
   	buff.c http_config.c http_core.c http_log.c http_main.c \
   	http_protocol.c http_request.c http_vhost.c util.c util_date.c \
   	util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
  -	rfc1413.c http_connection.c iol_file.c iol_socket.c listen.c \
  +	rfc1413.c http_connection.c listen.c \
           mpm_common.c util_charset.c util_debug.c util_xml.c \
   	util_filter.c
   
  
  
  
  1.59      +27 -26    apache-2.0/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/buff.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- buff.c	2000/08/17 00:54:03	1.58
  +++ buff.c	2000/08/23 00:01:52	1.59
  @@ -209,20 +209,20 @@
           fb->xbuf = NULL;
       }
   #endif
  -    return iol_close(fb->iol);
  +    return apr_close_socket(fb->bsock);
   }
   
   /*
    * Push some I/O file descriptors onto the stream
    */
  -API_EXPORT(void) ap_bpush_iol(BUFF *fb, ap_iol *iol)
  +API_EXPORT(void) ap_bpush_socket(BUFF *fb, apr_socket_t *sock)
   {
  -    fb->iol = iol;
  +    fb->bsock = sock;
       apr_register_cleanup(fb->pool, fb, bcleanup, bcleanup);
   }
  -API_EXPORT(void) ap_bpop_iol(ap_iol **iol, BUFF *fb)
  +API_EXPORT(void) ap_bpop_socket(apr_socket_t **sock, BUFF *fb)
   {
  -    *iol = fb->iol;
  +    *sock = fb->bsock;
       apr_kill_cleanup(fb->pool, fb, bcleanup);
   }
   
  @@ -239,8 +239,8 @@
   	    fb->flags |= B_NONBLOCK;
   	    /* XXX: should remove B_WR now... */
   	}
  -        /* ### set berrno if iol_setopt returns an error? */
  -	return iol_setopt(fb->iol, AP_IOL_TIMEOUT, optval);
  +        /* ### set berrno if apr_setsocketopt returns an error? */
  +	return apr_setsocketopt(fb->bsock, APR_SO_TIMEOUT, *(int *)optval);
   
   #ifdef APACHE_XLATE
       case BO_WXLATE:
  @@ -282,8 +282,8 @@
   	return APR_SUCCESS;
   
       case BO_TIMEOUT:
  -        /* ### set berrno if iol_getopt returns an error? */
  -	return iol_getopt(fb->iol, AP_IOL_TIMEOUT, optval);
  +        /* ### set berrno if apr_getsocketopt returns an error? */
  +	return apr_getsocketopt(fb->bsock, APR_SO_TIMEOUT, optval);
           
   #ifdef APACHE_XLATE
       case BO_WXLATE:
  @@ -358,12 +358,13 @@
       int timeout = 0;
   
       /* test for a block */
  -    iol_getopt(fb->iol, AP_IOL_TIMEOUT, &timeout);
  -    iol_setopt(fb->iol, AP_IOL_TIMEOUT, &zero);
  +    apr_getsocketopt(fb->bsock, APR_SO_TIMEOUT, &timeout);
  +    apr_setsocketopt(fb->bsock, APR_SO_TIMEOUT, zero);
       do {
  -        rv = iol_read(fb->iol, buf, nbyte, bytes_read);
  +        *bytes_read = nbyte;
  +        rv = apr_recv(fb->bsock, buf, bytes_read);
       } while (rv == APR_EINTR && !(fb->flags & B_EOUT));
  -    iol_setopt(fb->iol, AP_IOL_TIMEOUT, &timeout);
  +    apr_setsocketopt(fb->bsock, APR_SO_TIMEOUT, timeout);
   
       /* treat any error as if it would block as well */ 
       if (rv != APR_SUCCESS) {
  @@ -396,7 +397,7 @@
       }
   }
   
  -/* a wrapper around iol_read which checks for errors and EOFs */
  +/* a wrapper around apr_recv which checks for errors and EOFs */
   static apr_status_t read_with_errors(BUFF *fb, void *buf, apr_size_t nbyte,
                                       apr_ssize_t *bytes_read)
   {
  @@ -407,7 +408,8 @@
       }
       if (rv != APR_SUCCESS) {
           do {
  -            rv = iol_read(fb->iol, buf, nbyte, bytes_read);
  +            *bytes_read = nbyte;
  +            rv = apr_recv(fb->bsock, buf, bytes_read);
           } while (rv == EINTR && !(fb->flags &B_EOUT));
       }
       if (rv == APR_SUCCESS && *bytes_read == 0) {
  @@ -686,7 +688,7 @@
                                         int nvec, apr_ssize_t *bytes_written)
   {
       apr_status_t rv;
  -    rv = iol_writev(fb->iol, vec, nvec, bytes_written);
  +    rv = apr_sendv(fb->bsock, vec, nvec, bytes_written);
       fb->bytes_sent += *bytes_written;
       if (rv != APR_SUCCESS) {
           /* ### set berrno? */
  @@ -819,7 +821,8 @@
   {
       apr_status_t rv;
   
  -    rv = iol_write(fb->iol, buf, nbyte, bytes_written);
  +    *bytes_written = nbyte;
  +    rv = apr_send(fb->bsock, buf, bytes_written);
       fb->bytes_sent += *bytes_written;
       if (rv != APR_SUCCESS) {
           /* ### set berrno? */
  @@ -1072,7 +1075,7 @@
           ap_bsetflag(fb, B_EOUT, 1);
       }
       
  -    status = iol_shutdown(fb->iol, how);
  +    status = apr_shutdown(fb->bsock, how);
       
       return status;
   }
  @@ -1092,7 +1095,7 @@
       else
   	rc1 = APR_SUCCESS;
       apr_kill_cleanup(fb->pool, fb, bcleanup);
  -    rc2 = iol_close(fb->iol);
  +    rc2 = apr_close_socket(fb->bsock);
   
   #ifdef APACHE_XLATE
       if (fb->xbuf) {
  @@ -1264,20 +1267,18 @@
   
   API_EXPORT(BUFF *) ap_bopenf(apr_pool_t *a, const char *name, int flg, int mode)
   {
  -    ap_iol *iol;
       BUFF *fb;
       apr_status_t rv;
       apr_file_t *file = NULL;
  +    apr_socket_t *sock = NULL;
       rv = apr_open(&file, name, flg, 0, a);
       if ((rv != APR_SUCCESS) || (file == NULL)) {
           return NULL;
  -    }
  -    iol = ap_create_file_iol(file);
  -    if (!iol) {
  -        return NULL;
       }
  +    apr_socket_from_file(&sock, file);
       fb = ap_bcreate(a, ((flg &(B_RD|B_RDWR)) ? B_RD : 0)
  -		     | ((flg & (B_WR|B_RDWR)) ? B_WR : 0));
  -    ap_bpush_iol(fb, iol);
  +                     | ((flg & (B_WR|B_RDWR)) ? B_WR : 0));
  +    ap_bpush_socket(fb, sock);
       return fb;
   }
  +
  
  
  
  1.106     +1 -1      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- http_core.c	2000/08/19 06:04:57	1.105
  +++ http_core.c	2000/08/23 00:01:52	1.106
  @@ -2966,7 +2966,7 @@
   /* Default filter.  This filter should almost always be used.  It's only job
    * is to send the headers if they haven't already been sent, and then send
    * the actual data.  To send the data, we create an iovec out of the bucket
  - * brigade and then call the iol's writev function.  On platforms that don't
  + * brigade and then call the sendv function.  On platforms that don't
    * have writev, we have the problem of creating a lot of potentially small
    * packets that we are sending to the network.
    *
  
  
  
  1.115     +2 -2      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.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- http_protocol.c	2000/08/22 18:01:46	1.114
  +++ http_protocol.c	2000/08/23 00:01:52	1.115
  @@ -2311,7 +2311,7 @@
   
       /*
        * 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
  +     * call to apr_sendfile. So hijack it then set outcnt to 0
        * to prevent the data from being sent to the client again
        * when the buffer is flushed to the client at the end of the
        * request.
  @@ -2332,7 +2332,7 @@
           flags |= APR_SENDFILE_DISCONNECT_SOCKET;
       }
   
  -    rv = iol_sendfile(r->connection->client->iol, 
  +    rv = apr_sendfile(r->connection->client->bsock, 
                         fd,      /* The file to send */
                         &hdtr,   /* Header and trailer iovecs */
                         &offset, /* Offset in file to begin sending from */
  
  
  
  1.22      +1 -11     apache-2.0/src/modules/mpm/beos/beos.c
  
  Index: beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/beos/beos.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- beos.c	2000/08/13 18:38:03	1.21
  +++ beos.c	2000/08/23 00:01:53	1.22
  @@ -76,7 +76,6 @@
   #include "http_connection.h"
   #include "ap_mpm.h"
   #include "beosd.h"
  -#include "ap_iol.h"
   #include "ap_listen.h"
   #include "scoreboard.h" 
   #include <kernel/OS.h>
  @@ -308,7 +307,6 @@
   {
       BUFF *conn_io;
       conn_rec *current_conn;
  -    ap_iol *iol;
       long conn_id = my_child_num;
       int csd;
   
  @@ -323,16 +321,8 @@
   	    return;
       }
       
  -    iol = ap_iol_attach_socket(p, sock);
  -    if (iol == NULL) {
  -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
  -          "error attaching to socket");
  -        apr_close_socket(sock);
  -	    return;
  -    }
  -
       conn_io = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(conn_io, iol);
  +    ap_bpush_socket(conn_io, sock);
   
       current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock, 
                                            conn_id);
  
  
  
  1.125     +2 -4      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- dexter.c	2000/08/22 15:09:25	1.124
  +++ dexter.c	2000/08/23 00:01:53	1.125
  @@ -71,7 +71,6 @@
   #include "ap_mpm.h"
   #include "unixd.h"
   #include "mpm_common.h"
  -#include "ap_iol.h"
   #include "ap_listen.h"
   #include "mpm_default.h"
   #include "mpm.h"
  @@ -398,7 +397,6 @@
   {
       BUFF *conn_io;
       conn_rec *current_conn;
  -    ap_iol *iol;
       int csd;
       apr_status_t rv;
   
  @@ -417,9 +415,9 @@
       }
   
       ap_sock_disable_nagle(sock);
  -    iol = ap_iol_attach_socket(p, sock);
  +
       conn_io = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(conn_io, iol);
  +    ap_bpush_socket(conn_io, sock);
   
       current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                            conn_id);
  
  
  
  1.50      +1 -19     apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- mpmt_beos.c	2000/08/13 18:47:10	1.49
  +++ mpmt_beos.c	2000/08/23 00:01:54	1.50
  @@ -72,7 +72,6 @@
   #include "http_connection.h"
   #include "ap_mpm.h"
   #include "beosd.h"
  -#include "ap_iol.h"
   #include "ap_listen.h"
   #include "scoreboard.h" 
   #include "poll.h"
  @@ -298,28 +297,11 @@
   {
       BUFF *conn_io;
       conn_rec *current_conn;
  -    ap_iol *iol;
       long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
       int csd;
   
  -    iol = ap_iol_attach_socket(p, sock);
  -    if (iol == NULL) {
  -        if (errno == EBADF) {
  -            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, NULL,
  -                "filedescriptor (%u) larger than FD_SETSIZE (%u) "
  -                "found, you probably need to rebuild Apache with a "
  -                "larger FD_SETSIZE", csd, FD_SETSIZE);
  -        }
  -        else {
  -            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
  -                "error attaching to socket");
  -        }
  -        apr_close_socket(sock);
  -	return;
  -    }
  -
       conn_io = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(conn_io, iol);
  +    ap_bpush_socket(conn_io, sock);
   
       current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock, 
                                            conn_id);
  
  
  
  1.120     +1 -5      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- mpmt_pthread.c	2000/08/22 15:09:26	1.119
  +++ mpmt_pthread.c	2000/08/23 00:01:54	1.120
  @@ -72,7 +72,6 @@
   #include "ap_mpm.h"
   #include "unixd.h"
   #include "mpm_common.h"
  -#include "ap_iol.h"
   #include "ap_listen.h"
   #include "scoreboard.h" 
   
  @@ -395,7 +394,6 @@
   {
       BUFF *conn_io;
       conn_rec *current_conn;
  -    ap_iol *iol;
       long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
       int csd;
   
  @@ -413,12 +411,10 @@
   
       ap_sock_disable_nagle(sock);
   
  -    iol = ap_iol_attach_socket(p, sock);
  -
       (void) ap_update_child_status(my_child_num, my_thread_num,  
   				  SERVER_BUSY_READ, (request_rec *) NULL);
       conn_io = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(conn_io, iol);
  +    ap_bpush_socket(conn_io, sock);
   
       current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                            conn_id);
  
  
  
  1.20      +3 -8      apache-2.0/src/modules/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/perchild/perchild.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- perchild.c	2000/08/22 15:09:27	1.19
  +++ perchild.c	2000/08/23 00:01:55	1.20
  @@ -73,7 +73,6 @@
   #include "ap_mpm.h"
   #include "unixd.h"
   #include "mpm_common.h"
  -#include "ap_iol.h"
   #include "ap_listen.h"
   #include "mpm_default.h"
   #include "mpm.h"
  @@ -433,7 +432,6 @@
   {
       BUFF *conn_io;
       conn_rec *current_conn;
  -    ap_iol *iol;
       int csd;
       apr_status_t rv;
       int thread_num = conn_id % HARD_THREAD_LIMIT;
  @@ -455,9 +453,8 @@
       if (thread_socket_table[thread_num] < 0) {
           ap_sock_disable_nagle(sock);
       }
  -    iol = ap_iol_attach_socket(p, sock);
       conn_io = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(conn_io, iol);
  +    ap_bpush_socket(conn_io, sock);
   
       current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                            conn_id);
  @@ -1346,7 +1343,7 @@
   
   static int pass_request(request_rec *r)
   {
  -    apr_socket_t *thesock = ap_iol_get_socket(r->connection->client->iol);
  +    apr_socket_t *thesock = r->connection->client->bsock;
       struct msghdr msg;
       struct cmsghdr *cmsg;
       int sfd;
  @@ -1439,13 +1436,11 @@
   
       if (thread_socket_table[thread_num] != -1) {
           apr_socket_t *csd = NULL;
  -        ap_iol *iol;
   
           apr_put_os_sock(&csd, &thread_socket_table[thread_num], 
                                r->connection->client->pool);
           ap_sock_disable_nagle(thread_socket_table[thread_num]);
  -        iol = ap_iol_attach_socket(r->connection->client->pool, csd);
  -        ap_bpush_iol(r->connection->client, iol);
  +        ap_bpush_socket(r->connection->client, csd);
           return OK;
       }
       else {
  
  
  
  1.127     +1 -4      apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- prefork.c	2000/08/22 15:09:28	1.126
  +++ prefork.c	2000/08/23 00:01:55	1.127
  @@ -103,7 +103,6 @@
   #include "ap_mpm.h"
   #include "unixd.h"
   #include "mpm_common.h"
  -#include "ap_iol.h"
   #include "ap_listen.h"
   #include "ap_mmn.h"
   #ifdef HAVE_SYS_TYPES_H
  @@ -748,7 +747,6 @@
       ap_listen_rec *first_lr;
       apr_pool_t *ptrans;
       conn_rec *current_conn;
  -    ap_iol *iol;
       apr_status_t stat = APR_EINIT;
       int sockdes;
   
  @@ -1022,13 +1020,12 @@
   
   	ap_sock_disable_nagle(csd);
   
  -	iol = ap_iol_attach_socket(ptrans, csd);
   	(void) ap_update_child_status(my_child_num, SERVER_BUSY_READ,
   				   (request_rec *) NULL);
   
   	conn_io = ap_bcreate(ptrans, B_RDWR);
   
  -	ap_bpush_iol(conn_io, iol);
  +	ap_bpush_socket(conn_io, csd);
   
   	current_conn = ap_new_apr_connection(ptrans, ap_server_conf, conn_io, csd,
   					 my_child_num);
  
  
  
  1.62      +1 -12     apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- spmt_os2.c	2000/08/06 06:07:42	1.61
  +++ spmt_os2.c	2000/08/23 00:01:55	1.62
  @@ -71,7 +71,6 @@
   #include "scoreboard.h"
   #include "ap_mpm.h"
   #include "ap_listen.h"
  -#include "ap_iol.h"
   #include "apr_portable.h"
   #include "mpm_common.h"
   #include "apr_strings.h"
  @@ -742,7 +741,6 @@
       ap_listen_rec *first_lr = NULL;
       apr_pool_t *ptrans;
       conn_rec *current_conn;
  -    ap_iol *iol;
       apr_pool_t *pchild;
       parent_score *sc_parent_rec;
       int requests_this_child = 0;
  @@ -968,20 +966,11 @@
   
   	ap_sock_disable_nagle(csd);
   
  -        iol = ap_iol_attach_socket(ptrans, csd);
  -
  -	if (iol == NULL) {
  -          ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, NULL,
  -                       "error attaching to socket");
  -	    apr_close_socket(csd);
  -	    continue;
  -        }
  -
   	(void) ap_update_child_status(THREAD_GLOBAL(child_num), SERVER_BUSY_READ,
   				   (request_rec *) NULL);
   
   	conn_io = ap_bcreate(ptrans, B_RDWR);
  -        ap_bpush_iol(conn_io, iol);
  +        ap_bpush_socket(conn_io, csd);
   
   	current_conn = ap_new_apr_connection(ptrans, ap_server_conf, conn_io, csd,
                                                THREAD_GLOBAL(child_num));
  
  
  
  1.100     +4 -11     apache-2.0/src/modules/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- mpm_winnt.c	2000/08/22 01:24:07	1.99
  +++ mpm_winnt.c	2000/08/23 00:01:56	1.100
  @@ -70,7 +70,6 @@
   #include "ap_config.h"
   #include "ap_listen.h"
   #include "mpm_default.h"
  -#include "ap_iol.h"
   #include "mpm_winnt.h"
   #include "mpm_common.h"
   
  @@ -1123,7 +1122,6 @@
   
       while (1) {
           conn_rec *c;
  -        ap_iol *iol;
           apr_int32_t disconnected;
   
           /* Grab a connection off the network */
  @@ -1139,14 +1137,7 @@
           sock_disable_nagle(context->accept_socket);
           apr_put_os_sock(&context->sock, &context->accept_socket, context->ptrans);
   
  -        iol = ap_iol_attach_socket(context->ptrans, context->sock);
  -        if (iol == NULL) {
  -            ap_log_error(APLOG_MARK, APLOG_ERR, APR_ENOMEM, server_conf,
  -                         "worker_main: attach_socket() failed. Continuing...");
  -            closesocket(context->accept_socket);
  -            continue;
  -        }
  -        ap_bpush_iol(context->conn_io, iol);
  +        ap_bpush_socket(context->conn_io, context->sock);
           c = ap_new_connection(context->ptrans, server_conf, context->conn_io,
                                 (struct sockaddr_in *) context->sa_client,
                                 (struct sockaddr_in *) context->sa_server,
  @@ -1157,11 +1148,13 @@
   
           apr_getsocketopt(context->sock, APR_SO_DISCONNECTED, &disconnected);
           if (disconnected) {
  +            /* I have no idea if we should do anything here, so I leave this
  +             * for a windows guy
  +             */
               /* Kill the clean-up registered by the iol. We want to leave 
                * the accept socket open because we are about to try to 
                * reuse it
                */
  -            ap_bpop_iol(&iol, context->conn_io);
           }
           else {
               context->accept_socket = INVALID_SOCKET;
  
  
  
  1.11      +1 -2      apache-2.0/src/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_connect.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- proxy_connect.c	2000/08/06 06:07:43	1.10
  +++ proxy_connect.c	2000/08/23 00:01:56	1.11
  @@ -61,7 +61,6 @@
   #include "mod_proxy.h"
   #include "http_log.h"
   #include "http_main.h"
  -#include "ap_iol.h"
   
   #ifdef HAVE_BSTRING_H
   #include <bstring.h>        /* for IRIX, FD_SET calls bzero() */
  @@ -211,7 +210,7 @@
       }
   
       sock_buff = ap_bcreate(r->pool, B_RDWR);
  -    ap_bpush_iol(sock_buff, ap_iol_attach_socket(sock));
  +    ap_bpush_socket(sock_buff, sock);
   
       if(apr_setup_poll(&pollfd, 2, r->pool) != APR_SUCCESS)
       {
  
  
  
  1.16      +3 -4      apache-2.0/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- proxy_ftp.c	2000/08/06 06:07:44	1.15
  +++ proxy_ftp.c	2000/08/23 00:01:56	1.16
  @@ -62,7 +62,6 @@
   #include "http_main.h"
   #include "http_log.h"
   #include "http_core.h"
  -#include "ap_iol.h"
   
   #define AUTODETECT_PWD
   
  @@ -589,7 +588,7 @@
       }
   
       f = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(f, ap_iol_attach_socket(sock));
  +    ap_bpush_socket(f, sock);
   /* shouldn't we implement telnet control options here? */
   
   #ifdef CHARSET_EBCDIC
  @@ -1146,11 +1145,11 @@
               }
           }
           data = ap_bcreate(p, B_RDWR);
  -        ap_bpush_iol(f, ap_iol_attach_socket(csd));
  +        ap_bpush_socket(f, csd);
       }
       else {
           data = ap_bcreate(p, B_RDWR);
  -        ap_bpush_iol(data, ap_iol_attach_socket(dsock));
  +        ap_bpush_socket(data, dsock);
       }
   
   /* send response */
  
  
  
  1.15      +1 -2      apache-2.0/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- proxy_http.c	2000/08/06 06:07:44	1.14
  +++ proxy_http.c	2000/08/23 00:01:57	1.15
  @@ -63,7 +63,6 @@
   #include "http_main.h"
   #include "http_core.h"
   #include "util_date.h"
  -#include "ap_iol.h"
   
   /*
    * Canonicalise http-like URLs.
  @@ -269,7 +268,7 @@
       clear_connection(r->pool, r->headers_in);    /* Strip connection-based headers */
   
       f = ap_bcreate(p, B_RDWR);
  -    ap_bpush_iol(f, ap_iol_attach_socket(sock));
  +    ap_bpush_socket(f, sock);
   
       ap_bvputs(f, r->method, " ", proxyhost ? url : urlptr, " HTTP/1.0" CRLF,
                 NULL);
  
  
  
  1.57      +23 -10    apache-2.0/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_cgi.c	2000/08/06 06:07:46	1.56
  +++ mod_cgi.c	2000/08/23 00:01:57	1.57
  @@ -309,7 +309,7 @@
       apr_proc_t *procnew = apr_pcalloc(p, sizeof(*procnew));
       apr_status_t rc = APR_SUCCESS;
       apr_file_t *file = NULL;
  -    ap_iol *iol;
  +    apr_file_t *sock = NULL;
   #if defined(RLIMIT_CPU)  || defined(RLIMIT_NPROC) || \
       defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS)
       core_dir_config *conf;
  @@ -379,29 +379,42 @@
   
               /* Fill in BUFF structure for parents pipe to child's stdout */
               file = procnew->out;
  -            iol = ap_create_file_iol(file);
  -            if (!iol)
  +            if (!file)
                   return APR_EBADF;
  +            /* XXX This is a hack.  The correct solution is to create a
  +             * pipe bucket, and just pass it down.  Since that bucket type
  +             * hasn't been written, we can hack it for the moment.
  +             */
  +            apr_socket_from_file(&sock, file);
  +
               *script_in = ap_bcreate(p, B_RD);
  -            ap_bpush_iol(*script_in, iol);
  +            ap_bpush_socket(*script_in, sock);
               ap_bsetopt(*script_in, BO_TIMEOUT, &r->server->timeout);
   
               /* Fill in BUFF structure for parents pipe to child's stdin */
               file = procnew->in;
  -            iol = ap_create_file_iol(file);
  -            if (!iol)
  +            if (!file)
                   return APR_EBADF;
  +            /* XXX This is a hack.  The correct solution is to create a
  +             * pipe bucket, and just pass it down.  Since that bucket type
  +             * hasn't been written, we can hack it for the moment.
  +             */
  +            apr_socket_from_file(&sock, file);
               *script_out = ap_bcreate(p, B_WR);
  -            ap_bpush_iol(*script_out, iol);
  +            ap_bpush_socket(*script_out, sock);
               ap_bsetopt(*script_out, BO_TIMEOUT, &r->server->timeout);
   
               /* Fill in BUFF structure for parents pipe to child's stderr */
               file = procnew->err;
  -            iol = ap_create_file_iol(file);
  -            if (!iol)
  +            if (!file)
                   return APR_EBADF;
  +            /* XXX This is a hack.  The correct solution is to create a
  +             * pipe bucket, and just pass it down.  Since that bucket type
  +             * hasn't been written, we can hack it for the moment.
  +             */
  +            apr_socket_from_file(&sock, file);
               *script_err = ap_bcreate(p, B_RD);
  -            ap_bpush_iol(*script_err, iol);
  +            ap_bpush_socket(*script_err, sock);
               ap_bsetopt(*script_err, BO_TIMEOUT, &r->server->timeout);
           }
       }
  
  
  
  1.37      +1 -5      apache-2.0/src/modules/standard/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgid.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- mod_cgid.c	2000/08/06 12:15:57	1.36
  +++ mod_cgid.c	2000/08/23 00:01:57	1.37
  @@ -89,7 +89,6 @@
   #include "http_conf_globals.h" 
   #include "buff.h" 
   #include "ap_mpm.h"
  -#include "ap_iol.h"
   #include "unixd.h"
   #include <sys/stat.h>
   #ifdef HAVE_SYS_SOCKET_H
  @@ -840,7 +839,6 @@
       struct sockaddr_un unix_addr;
       apr_socket_t *tempsock = NULL;
       int nbytes;
  -    ap_iol *iol;
       script = ap_bcreate(r->pool, B_RDWR); 
   
       if (r->method_number == M_OPTIONS) { 
  @@ -920,9 +918,7 @@
   
       apr_put_os_sock(&tempsock, &sd, pcgi);
   
  -    iol = ap_iol_attach_socket(pcgi, tempsock);
  -
  -    ap_bpush_iol(script, iol); 
  +    ap_bpush_socket(script, tempsock); 
   
       if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) 
           return retval; 
  
  
  
  1.52      +8 -4      apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_include.c	2000/08/07 20:11:37	1.51
  +++ mod_include.c	2000/08/23 00:01:57	1.52
  @@ -836,7 +836,7 @@
       apr_table_t *env = r->subprocess_env;
       char **argv;
       apr_file_t *file = NULL;
  -    ap_iol *iol;
  +    apr_socket_t *sock = NULL;
   #if defined(RLIMIT_CPU)  || defined(RLIMIT_NPROC) || \
       defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS)
       core_dir_config *conf; 
  @@ -908,11 +908,15 @@
               apr_note_subprocess(r->pool, procnew, kill_after_timeout);
               /* Fill in BUFF structure for parents pipe to child's stdout */
               file = procnew->out;
  -            iol = ap_create_file_iol(file);
  -            if (!iol)
  +            if (!file)
                   return APR_EBADF;
  +            /* XXX This is a hack.  The correct solution is to create a 
  +             * pipe bucket, and just pass it down.  Since that bucket type
  +             * hasn't been written, we can hack it for the moment.
  +             */ 
  +            apr_socket_from_file(&sock, file);
               script_in = ap_bcreate(r->pool, B_RD);
  -            ap_bpush_iol(script_in, iol);
  +            ap_bpush_socket(script_in, sock);
               ap_send_fb(script_in, r);
               ap_bclose(script_in);
           }
  
  
  
  1.27      +8 -5      apache-2.0/src/modules/standard/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_mime_magic.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_mime_magic.c	2000/08/06 06:07:47	1.26
  +++ mod_mime_magic.c	2000/08/23 00:01:58	1.27
  @@ -2149,7 +2149,7 @@
       apr_pool_t *child_context = cntxt;
       apr_procattr_t *procattr;
       apr_proc_t *procnew;
  -    ap_iol *iol;
  +    apr_socket_t *sock;
   
       env = ap_create_environment(child_context, r->subprocess_env);
   
  @@ -2185,13 +2185,16 @@
           else {
               apr_note_subprocess(child_context, procnew, kill_after_timeout);
               /* Fill in BUFF structure for parents pipe to child's stdout */
  -            iol = ap_create_file_iol(procnew->out);
  -            if (!iol)
  -                return APR_EBADF;
  +            /* XXX This is a hack.  The correct solution is to create a
  +             * pipe bucket, and just pass it down.  Since that bucket type
  +             * hasn't been written, we can hack it for the moment.
  +             */
  +            apr_socket_from_file(&sock, procnew->out);
  +
               if (script_in) {
                   *script_in = ap_bcreate(child_context, B_RD);
               }
  -            ap_bpush_iol(*script_in, iol);
  +            ap_bpush_socket(*script_in, sock);
           }
       }