httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Wed, 07 Mar 2001 17:01:30 GMT
rbb         01/03/07 09:01:29

  Modified:    .        CHANGES
               server   protocol.c
  Log:
  Fix content-length computation.  We ONLY compute a content-length if
  We are not in a 1.1 request and we cannot chunk, and this is a keepalive
  or we already have all the data.
  
  Revision  Changes    Path
  1.123     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -d -b -w -u -r1.122 -r1.123
  --- CHANGES	2001/03/06 21:46:10	1.122
  +++ CHANGES	2001/03/07 17:01:22	1.123
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.14-dev
   
  +  *) Fix content-length computation.  We ONLY compute a content-length if
  +     We are not in a 1.1 request and we cannot chunk, and this is a keepalive
  +     or we already have all the data.  [Ryan Bloom]
  +
     *) Report unbounded containers in the config file.  Previously, a typo
        in the </container> directive could result in the rest of the config
        file being silently ignored, with undesired defaults used.
  
  
  
  1.4       +8 -8      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -d -b -w -u -r1.3 -r1.4
  --- protocol.c	2001/03/05 06:16:28	1.3
  +++ protocol.c	2001/03/07 17:01:28	1.4
  @@ -1176,20 +1176,20 @@
       }
   
       /* We will compute a content length if:
  -     *     We already have all the data
  +     *     The protocol is < 1.1
  +     * and We can not chunk
  +     * and this is a keepalive request.
  +     * or  We already have all the data
        *         This is a bit confusing, because we will always buffer up
        *         to AP_MIN_BYTES_TO_WRITE, so if we get all the data while
        *         we are buffering that much data, we set the c-l.
  -     *  or We are in a 1.1 request and we can't chunk
  -     *  or This is a keepalive connection
  -     *         We may want to change this later to just close the connection
        */
  -    if ((r->proto_num == HTTP_VERSION(1,1)
  -        && !ap_find_last_token(f->r->pool,
  +    if ((r->proto_num < HTTP_VERSION(1,1)
  +        && (!ap_find_last_token(f->r->pool,
                                  apr_table_get(r->headers_out,
                                                "Transfer-Encoding"),
  -                               "chunked"))
  -        || (f->r->connection->keepalive)
  +                               "chunked")
  +        && (f->r->connection->keepalive)))
           || (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(b)))) {
           ctx->compute_len = 1;
       }
  
  
  

Mime
View raw message