httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Tue, 24 Jul 2001 21:33:44 GMT
stoddard    01/07/24 14:33:44

  Modified:    server   protocol.c
  Log:
  A couple of optimizations to the content_length filter.
  
  Revision  Changes    Path
  1.32      +11 -12    httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- protocol.c	2001/07/06 19:49:47	1.31
  +++ protocol.c	2001/07/24 21:33:44	1.32
  @@ -888,15 +888,6 @@
           APR_BRIGADE_FOREACH(e, b) {
               const char *ignored;
               apr_size_t len;
  -            /* If we've accumulated more than 4xAP_MIN_BYTES_TO_WRITE and 
  -             * the client supports chunked encoding, send what we have 
  -             * and come back for more.
  -             */
  -            if ((ctx->curr_len > 4*AP_MIN_BYTES_TO_WRITE) && partial_send_okay)
{
  -                split = b;
  -                more = apr_brigade_split(b, e);
  -                break;
  -            }
               len = 0;
               if (APR_BUCKET_IS_EOS(e)) {
                   eos = 1;
  @@ -904,10 +895,18 @@
               else if (APR_BUCKET_IS_FLUSH(e)) {
                   if (partial_send_okay) {
                       split = b;
  +                    more = apr_brigade_split(b, APR_BUCKET_NEXT(e));
  +                    break;
  +                }
  +            }
  +            else if ((ctx->curr_len > 4*AP_MIN_BYTES_TO_WRITE)) {
  +                /* If we've accumulated more than 4xAP_MIN_BYTES_TO_WRITE and 
  +                 * the client supports chunked encoding, send what we have 
  +                 * and come back for more.
  +                 */
  +                if (partial_send_okay) {
  +                    split = b;
                       more = apr_brigade_split(b, e);
  -                    /* Remove the flush bucket from brigade 'more' */
  -                    APR_BUCKET_REMOVE(e);
  -                    flush = 1;
                       break;
                   }
               }
  
  
  

Mime
View raw message