httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Wed, 01 Aug 2001 19:15:22 GMT
wrowe       01/08/01 12:15:22

  Modified:    server   core.c
  Log:
    This patch fixes more untold breakage than you can shake a stick at.
  
  Revision  Changes    Path
  1.32      +8 -3      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- core.c	2001/07/30 18:51:57	1.31
  +++ core.c	2001/08/01 19:15:22	1.32
  @@ -3077,6 +3077,7 @@
          to the connection. */
       while (b) {
           apr_size_t nbytes = 0;
  +        apr_bucket *last_e = NULL; /* initialized for debugging */
           apr_bucket *e;
   
           /* tail of brigade if we need another pass */
  @@ -3095,6 +3096,10 @@
   
           /* Iterate over the brigade: collect iovecs and/or a file */
           APR_BRIGADE_FOREACH(e, b) {
  +            /* XXX: APR_BRIGADE_FOREACH breaks the value of e! 
  +             * is that the expected behavior?
  +             */
  +            last_e = e;
               if (APR_BUCKET_IS_EOS(e) || APR_BUCKET_IS_FLUSH(e)) {
                   break;
               }
  @@ -3166,13 +3171,13 @@
            *       with the hope of concatenating with another response)
            */
           if ((!fd && !more && 
  -            (nbytes + flen < AP_MIN_BYTES_TO_WRITE) && !APR_BUCKET_IS_FLUSH(e))
  -            || (nbytes + flen < AP_MIN_BYTES_TO_WRITE && APR_BUCKET_IS_EOS(e)
&& c->keepalive)) {
  +            (nbytes + flen < AP_MIN_BYTES_TO_WRITE) && !APR_BUCKET_IS_FLUSH(last_e))
  +            || (nbytes + flen < AP_MIN_BYTES_TO_WRITE && APR_BUCKET_IS_EOS(last_e)
&& c->keepalive)) {
               /* NEVER save an EOS in here.  If we are saving a brigade with 
                * an EOS bucket, then we are doing keepalive connections, and 
                * we want to process to second request fully.
                */
  -            if (APR_BUCKET_IS_EOS(e)) {
  +            if (APR_BUCKET_IS_EOS(last_e)) {
                   apr_bucket *bucket = NULL;
                   /* If we are in here, then this request is a keepalive.  We
                    * need to be certain that any data in a bucket is valid
  
  
  

Mime
View raw message