httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 26 Nov 2001 08:49:29 GMT
brianp      01/11/26 00:49:29

  Modified:    server   core.c
  Log:
  Another fix for the core_output_filter() code that concatenates
  small buckets: It's possible for the temporary brigade to
  contain more than one bucket.  If this happens, we need to
  recover the buckets after the first from the temporary brigade
  before destroying it.
  
  Revision  Changes    Path
  1.108     +9 -2      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- core.c	2001/11/26 07:21:48	1.107
  +++ core.c	2001/11/26 08:49:29	1.108
  @@ -3080,7 +3080,7 @@
                       if (!fd) {
                           if (nvec == MAX_IOVEC_TO_WRITE) {
                               /* woah! too many. buffer them up, for use later. */
  -                            apr_bucket *temp;
  +                            apr_bucket *temp, *next;
                               apr_bucket_brigade *temp_brig;
   
                               temp_brig = apr_brigade_create(f->c->pool);
  @@ -3097,9 +3097,16 @@
                               temp = APR_BRIGADE_FIRST(temp_brig);
                               APR_BUCKET_REMOVE(temp);
                               APR_BRIGADE_INSERT_HEAD(b, temp);
  -                            apr_brigade_destroy(temp_brig);
                               e = temp;
                               last_e = e;
  +                            for (next = APR_BRIGADE_FIRST(temp_brig);
  +                                 next != APR_BRIGADE_SENTINEL(temp_brig);
  +                                 next = APR_BRIGADE_FIRST(temp_brig)) {
  +                                APR_BUCKET_REMOVE(next);
  +                                APR_BUCKET_INSERT_AFTER(temp, next);
  +                                temp = next;
  +                            }
  +                            apr_brigade_destroy(temp_brig);
                               nvec = 0;
                               apr_bucket_read(e, &str, &n, APR_BLOCK_READ);
                           }
  
  
  

Mime
View raw message