httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_deflate.c
Date Mon, 07 Jun 2004 10:31:52 GMT
jorton      2004/06/07 03:31:52

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/filters Tag: APACHE_2_0_BRANCH mod_deflate.c
  Log:
  Backport from HEAD:
  
    * modules/filters/mod_deflate.c (deflate_out_filter): Destroy buckets
    immediately after they are used so that memory consumption is not
    proportional to the size of the response.
  
  PR: 29318
  Reviewed by: Jeff Trawick, André Malo
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.297 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.296
  retrieving revision 1.988.2.297
  diff -d -w -u -r1.988.2.296 -r1.988.2.297
  --- CHANGES	7 Jun 2004 10:18:35 -0000	1.988.2.296
  +++ CHANGES	7 Jun 2004 10:31:50 -0000	1.988.2.297
  @@ -5,6 +5,9 @@
        (trusted) client certificate subject DN which exceeds 6K in length.
        [Joe Orton]
   
  +  *) mod_deflate: Fix memory consumption (which was proportional to the
  +     response size).  PR 29318.  [Joe Orton]
  +
     *) mod_ssl: Log the errors returned on failure to load or initialize
        a crypto accelerator engine.  [Joe Orton]
   
  
  
  
  1.751.2.905 +1 -6      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.904
  retrieving revision 1.751.2.905
  diff -d -w -u -r1.751.2.904 -r1.751.2.905
  --- STATUS	7 Jun 2004 10:18:36 -0000	1.751.2.904
  +++ STATUS	7 Jun 2004 10:31:51 -0000	1.751.2.905
  @@ -72,11 +72,6 @@
     [ please place file names and revisions from HEAD here, so it is easy to
       identify exactly what the proposed changes are! ]
   
  -    *) mod_deflate: Fix memory consumption proportional to response size.
  -       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/filters/mod_deflate.c?r1=1.48&r2=1.49
  -       PR: 29318
  -       +1: jorton, trawick, nd
  -
       *) mod_ssl: Remove some unused functions (after CAN-2004-0488 fix is applied)
          http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/ssl/ssl_util.c?r1=1.46&r2=1.47
          +1: jorton, nd
  
  
  
  No                   revision
  No                   revision
  1.26.2.13 +9 -2      httpd-2.0/modules/filters/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
  retrieving revision 1.26.2.12
  retrieving revision 1.26.2.13
  diff -d -w -u -r1.26.2.12 -r1.26.2.13
  --- mod_deflate.c	9 Feb 2004 20:53:17 -0000	1.26.2.12
  +++ mod_deflate.c	7 Jun 2004 10:31:52 -0000	1.26.2.13
  @@ -415,13 +415,15 @@
           ctx->stream.avail_out = c->bufferSize;
       }
       
  -    APR_BRIGADE_FOREACH(e, bb) {
  +    while (!APR_BRIGADE_EMPTY(bb))
  +    {
           const char *data;
           apr_bucket *b;
           apr_size_t len;
  -
           int done = 0;
   
  +        e = APR_BRIGADE_FIRST(bb);
  +
           if (APR_BUCKET_IS_EOS(e)) {
               char *buf;
               unsigned int deflate_len;
  @@ -508,6 +510,9 @@
           if (APR_BUCKET_IS_FLUSH(e)) {
               apr_bucket *bkt;
               apr_status_t rv;
  +
  +            apr_bucket_delete(e);
  +
               if (ctx->stream.avail_in > 0) {
                   zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
                   if (zRC != Z_OK) {
  @@ -567,6 +572,8 @@
               if (zRC != Z_OK)
                   return APR_EGENERAL;
           }
  +
  +        apr_bucket_delete(e);
       }
   
       apr_brigade_cleanup(bb);
  
  
  

Mime
View raw message