httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/ap ap_buckets_eos.c ap_buckets_flush.c
Date Tue, 07 Nov 2000 00:33:49 GMT
rbb         00/11/06 16:33:49

  Modified:    src      CHANGES
               src/include ap_buckets.h
               src/modules/experimental mod_charset_lite.c
               src/ap   ap_buckets_eos.c ap_buckets_flush.c
  Log:
  Remvoe AP_END_OF_BRIGADE.  This definition didn't really mean anything,
  because it didn't signify the end of the brigade, and it didn't signify
  the end of a response.  It ended up meaning flush the data, which can be
  detemined with bucket type checks.  This also makes the FLUSH and EOS
  buckets have a 0 length, which makes a lot of code cleaner, because now we
  can just add lengths and be sure they are all >=0.
  
  Revision  Changes    Path
  1.310     +9 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.309
  retrieving revision 1.310
  diff -u -r1.309 -r1.310
  --- CHANGES	2000/11/06 01:58:38	1.309
  +++ CHANGES	2000/11/07 00:33:47	1.310
  @@ -1,4 +1,13 @@
   Changes with Apache 2.0a8
  +  *) Remove AP_END_OF_BRIGADE definition.  This does not signify what
  +     it says, because it was only used by EOS and FLUSH buckets.  Since
  +     neither of those are required at the end of a brigade, this was
  +     really signifying FLUSH_THE_DATA, but that can be determined better
  +     by checking AP_BUCKET_IS_EOS() or AP_BUCKET_IS_FLUSH.  EOS and FLUSH
  +     buckets now return a length of 0, which is actually the amount of data
  +     read, so they make more sense.
  +     [Ryan Bloom]
  +
     *) Allow the core_output_filter to save some data past the end of a
        request.  If we get an EOS bucket, we only send the data if it 
        makes sense to send it.  This allows us to pipeline request
  
  
  
  1.48      +3 -8      apache-2.0/src/include/ap_buckets.h
  
  Index: ap_buckets.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/ap_buckets.h,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ap_buckets.h	2000/11/04 01:30:35	1.47
  +++ ap_buckets.h	2000/11/07 00:33:47	1.48
  @@ -119,11 +119,8 @@
   
   /* The types of bucket brigades the code knows about.  We don't really need
    * this enum.  All access to the bucket brigades is done through function
  - * pointers in the bucket type.  However, when we start to do conversion
  - * routines, this enum will be a huge performance benefit, so we leave it
  - * alone.
  + * pointers in the bucket type.  
    */
  -#define AP_END_OF_BRIGADE       -1
   
   /**
    * Forward declaration of the main types.
  @@ -155,8 +152,7 @@
        * @param b The bucket to read from
        * @param str A place to store the data read.  Allocation should only be
        *            done if absolutely necessary. 
  -     * @param len The amount of data read,
  -     *            or -1 (AP_END_OF_BRIGADE) if there is no more data
  +     * @param len The amount of data read.
        * @param block Should this read function block if there is more data that
        *              cannot be read immediately.
        * @deffunc apr_status_t read(ap_bucket *b, const char **str, apr_ssize_t *len, ap_read_type
block)
  @@ -191,8 +187,7 @@
   struct ap_bucket {
       /** Links to the rest of the brigade */
       AP_RING_ENTRY(ap_bucket) link;
  -    /** The type of bucket.  These types can be found in the enumerated
  -     *  type above */
  +    /** The type of bucket.  */
       const ap_bucket_type *type;
       /** The length of the data in the bucket.  This could have been implemented
        *  with a function, but this is an optimization, because the most
  
  
  
  1.31      +2 -2      apache-2.0/src/modules/experimental/mod_charset_lite.c
  
  Index: mod_charset_lite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/experimental/mod_charset_lite.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_charset_lite.c	2000/10/25 17:32:52	1.30
  +++ mod_charset_lite.c	2000/11/07 00:33:48	1.31
  @@ -881,7 +881,7 @@
               }
               if (AP_BUCKET_IS_EOS(dptr)) {
                   done = 1;
  -                cur_len = AP_END_OF_BRIGADE; /* XXX yuck, but that tells us to send
  +                cur_len = -1; /* XXX yuck, but that tells us to send
                                    * eos down; when we minimize our bb construction
                                    * we'll fix this crap */
                   if (ctx->saved) {
  @@ -962,7 +962,7 @@
           }
       }
       if (rv == APR_SUCCESS) {
  -        if (cur_len == AP_END_OF_BRIGADE) {
  +        if (cur_len == -1) {
               rv = send_eos(f);
           }
       }
  
  
  
  1.12      +2 -2      apache-2.0/src/ap/ap_buckets_eos.c
  
  Index: ap_buckets_eos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_eos.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ap_buckets_eos.c	2000/11/04 01:30:26	1.11
  +++ ap_buckets_eos.c	2000/11/07 00:33:48	1.12
  @@ -60,13 +60,13 @@
                                   apr_ssize_t *len, ap_read_type block)
   {
       *str = NULL;
  -    *len = AP_END_OF_BRIGADE;
  +    *len = 0;
       return APR_SUCCESS;
   }
   
   AP_DECLARE(ap_bucket *) ap_bucket_make_eos(ap_bucket *b)
   {
  -    b->length    = AP_END_OF_BRIGADE;
  +    b->length    = 0;
       b->data      = NULL;
   
       b->type      = &ap_eos_type;
  
  
  
  1.4       +1 -1      apache-2.0/src/ap/ap_buckets_flush.c
  
  Index: ap_buckets_flush.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_flush.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap_buckets_flush.c	2000/11/04 01:30:27	1.3
  +++ ap_buckets_flush.c	2000/11/07 00:33:48	1.4
  @@ -60,7 +60,7 @@
                                   apr_ssize_t *len, ap_read_type block)
   {
       *str = NULL;
  -    *len = b->length;
  +    *len = 0;
       return APR_SUCCESS;
   }
   
  
  
  

Mime
View raw message