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/modules/proxy proxy_http.c
Date Mon, 05 Feb 2001 15:04:32 GMT
trawick     01/02/05 07:04:32

  Modified:    .        CHANGES
               server/mpm/beos beos.c
               server/mpm/dexter dexter.c
               server/mpm/mpmt_beos mpmt_beos.c
               server/mpm/mpmt_pthread mpmt_pthread.c
               server/mpm/perchild perchild.c
               server/mpm/spmt_os2 spmt_os2.c
               include  http_connection.h
               modules/proxy proxy_http.c
  Log:
  ap_new_connection() returns NULL if an error occurred (prefork MPM
  and ap_new_connection() were changed last week)
  
  I have skipped putting the change into WinNT MPM and mod_proxy.  I
  left a note in the mod_proxy code; for the NT MPM I think I can talk
  somebody into doing the right thing for me.
  
  Revision  Changes    Path
  1.74      +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- CHANGES	2001/02/05 01:02:26	1.73
  +++ CHANGES	2001/02/05 15:04:30	1.74
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0b1
   
  +  *) ap_new_connection() closes the socket and returns NULL if a socket
  +     call fails.  Usually this is due to a connection which has been 
  +     reset.  [Jeff Trawick]
  +
     *) Move the Apache version information out of httpd.h and into release.h.
        This is in preparation for the first tag with the new tag and release
        system.  [Ryan Bloom]
  
  
  
  1.35      +4 -3      httpd-2.0/server/mpm/beos/beos.c
  
  Index: beos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- beos.c	2001/02/04 03:12:48	1.34
  +++ beos.c	2001/02/05 15:04:31	1.35
  @@ -317,9 +317,10 @@
       }
       
       current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id);
  -
  -    ap_process_connection(current_conn);
  -    ap_lingering_close(current_conn);
  +    if (current_conn) {
  +        ap_process_connection(current_conn);
  +        ap_lingering_close(current_conn);
  +    }
   }
   
   static int32 worker_thread(void * dummy)
  
  
  
  1.141     +4 -3      httpd-2.0/server/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/dexter/dexter.c,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- dexter.c	2001/02/01 21:54:37	1.140
  +++ dexter.c	2001/02/05 15:04:31	1.141
  @@ -419,9 +419,10 @@
                                     SERVER_BUSY_READ, (request_rec *) NULL);
   
       current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id);
  -
  -    ap_process_connection(current_conn);
  -    ap_lingering_close(current_conn);
  +    if (current_conn) {
  +        ap_process_connection(current_conn);
  +        ap_lingering_close(current_conn);
  +    }
   }
   
   static void *worker_thread(void *);
  
  
  
  1.61      +4 -3      httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- mpmt_beos.c	2001/02/04 03:12:48	1.60
  +++ mpmt_beos.c	2001/02/05 15:04:31	1.61
  @@ -300,9 +300,10 @@
       int csd;
   
       current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id);
  -
  -    ap_process_connection(current_conn);
  -    ap_lingering_close(current_conn);
  +    if (current_conn) {
  +        ap_process_connection(current_conn);
  +        ap_lingering_close(current_conn);
  +    }
   }
   
   static int32 worker_thread(void * dummy)
  
  
  
  1.138     +4 -3      httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- mpmt_pthread.c	2001/02/04 03:12:48	1.137
  +++ mpmt_pthread.c	2001/02/05 15:04:31	1.138
  @@ -410,9 +410,10 @@
   				  SERVER_BUSY_READ, (request_rec *) NULL);
   
       current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id);
  -
  -    ap_process_connection(current_conn);
  -    ap_lingering_close(current_conn);
  +    if (current_conn) {
  +        ap_process_connection(current_conn);
  +        ap_lingering_close(current_conn);
  +    }
   }
   /* Sets workers_may_exit if we received a character on the pipe_of_death */
   static void check_pipe_of_death(void)
  
  
  
  1.37      +4 -3      httpd-2.0/server/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- perchild.c	2001/01/20 21:42:21	1.36
  +++ perchild.c	2001/02/05 15:04:32	1.37
  @@ -456,9 +456,10 @@
       }
   
       current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id);
  -
  -    ap_process_connection(current_conn);
  -    ap_lingering_close(current_conn);
  +    if (current_conn) {
  +        ap_process_connection(current_conn);
  +        ap_lingering_close(current_conn);
  +    }
   }
   
   static void *worker_thread(void *);
  
  
  
  1.75      +4 -3      httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- spmt_os2.c	2001/02/04 03:12:49	1.74
  +++ spmt_os2.c	2001/02/05 15:04:32	1.75
  @@ -940,9 +940,10 @@
   
   	current_conn = ap_new_connection(ptrans, ap_server_conf, csd,
                                            THREAD_GLOBAL(child_num));
  -
  -	ap_process_connection(current_conn);
  -        ap_lingering_close(current_conn);
  +        if (current_conn) {
  +            ap_process_connection(current_conn);
  +            ap_lingering_close(current_conn);
  +        }
       }
   
       clean_child_exit(0);
  
  
  
  1.33      +1 -0      httpd-2.0/include/http_connection.h
  
  Index: http_connection.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_connection.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- http_connection.h	2001/02/04 03:00:14	1.32
  +++ http_connection.h	2001/02/05 15:04:32	1.33
  @@ -73,6 +73,7 @@
    * @param server The server to create the connection for
    * @param inout The socket to use for all communication with the client
    * @param id ID of this connection; unique at any point in time.
  + * @return new conn_rec, or NULL if the connection has already been reset
    */
   conn_rec *ap_new_connection(apr_pool_t *p, server_rec *server, 
                               apr_socket_t *inout, long id);
  
  
  
  1.28      +6 -0      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- proxy_http.c	2001/01/19 07:04:25	1.27
  +++ proxy_http.c	2001/02/05 15:04:32	1.28
  @@ -277,6 +277,12 @@
       }
   
       origin = ap_new_connection(r->pool, r->server, sock, 0);
  +    if (!origin) {
  +        /* the peer reset the connection already; ap_new_connection() 
  +         * closed the socket */
  +        /* XXX somebody that knows what they're doing add an error path */
  +    }
  +
       ap_add_output_filter("CORE", NULL, NULL, origin);
   
       clear_connection(r->pool, r->headers_in);	/* Strip connection-based headers */
  
  
  

Mime
View raw message