httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Fri, 08 Nov 2002 17:19:11 GMT
gregames    2002/11/08 09:19:10

  Modified:    .        CHANGES
               include  httpd.h
               server   core.c
  Log:
  use a subpool of c->pool for resources which are set aside, then clear it
  after writing the data to the network.  This closes files sooner with
  keepalive connections.
  
  Revision  Changes    Path
  1.972     +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.971
  retrieving revision 1.972
  diff -u -r1.971 -r1.972
  --- CHANGES	8 Nov 2002 09:24:00 -0000	1.971
  +++ CHANGES	8 Nov 2002 17:19:09 -0000	1.972
  @@ -1,5 +1,10 @@
   Changes with Apache 2.0.44
   
  +  *) Fix a bug where we keep files open until the end of a 
  +     keepalive connection, which can result in:
  +     (24)Too many open files: file permissions deny server access
  +     especially on threaded servers.  [Greg Ames, Jeff Trawick]
  +
     *) Fix a bug in which mod_proxy sent an invalid Content-Length
        when a proxied URL was invoked as a server-side include within
        a page generated in response to a form POST.  [Brian Pane]
  
  
  
  1.191     +3 -4      httpd-2.0/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/httpd.h,v
  retrieving revision 1.190
  retrieving revision 1.191
  diff -u -r1.190 -r1.191
  --- httpd.h	11 Oct 2002 15:29:20 -0000	1.190
  +++ httpd.h	8 Nov 2002 17:19:10 -0000	1.191
  @@ -1115,10 +1115,9 @@
   
   typedef struct core_output_filter_ctx {
       apr_bucket_brigade *b;
  -    apr_pool_t *subpool; /* subpool of c->pool used for data saved after a
  -                          * request is finished
  -                          */
  -    int subpool_has_stuff; /* anything in the subpool? */
  +    apr_pool_t *deferred_write_pool; /* subpool of c->pool used for resources 
  +                                      * which may outlive the request
  +                                      */
   } core_output_filter_ctx_t;
    
   typedef struct core_filter_ctx {
  
  
  
  1.220     +12 -1     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.219
  retrieving revision 1.220
  diff -u -r1.219 -r1.220
  --- core.c	8 Nov 2002 13:17:09 -0000	1.219
  +++ core.c	8 Nov 2002 17:19:10 -0000	1.220
  @@ -3923,7 +3923,10 @@
                       }
                   }
               }
  -            ap_save_brigade(f, &ctx->b, &b, c->pool);
  +            if (!ctx->deferred_write_pool) {
  +                apr_pool_create(&ctx->deferred_write_pool, c->pool);
  +            }
  +            ap_save_brigade(f, &ctx->b, &b, ctx->deferred_write_pool);
   
               return APR_SUCCESS;
           }
  @@ -3994,6 +3997,14 @@
           }
   
           apr_brigade_destroy(b);
  +
  +        /* drive cleanups for resources which were set aside 
  +         * this may occur before or after termination of the request which
  +         * created the resource
  +         */
  +        if (ctx->deferred_write_pool) {
  +            apr_pool_clear(ctx->deferred_write_pool);  
  +        }
           if (rv != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
                            "core_output_filter: writing data to the network");
  
  
  

Mime
View raw message