httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Wed, 01 Nov 2000 18:42:59 GMT
trawick     00/11/01 10:42:57

  Modified:    src/main http_protocol.c
  Log:
  Create the pool bucket after we know the true length, because
  (currently) we can't shorten the length of such a bucket by
  setting e->length.  (We could split and then remove the extra
  bucket, but this seems cleaner.  We may still want to have a
  way to shorten a bucket, but there isn't a pressing need for
  that at the moment.)
  
  Revision  Changes    Path
  1.219     +3 -4      apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.218
  retrieving revision 1.219
  diff -u -r1.218 -r1.219
  --- http_protocol.c	2000/11/01 18:24:11	1.218
  +++ http_protocol.c	2000/11/01 18:42:55	1.219
  @@ -2322,7 +2322,7 @@
       const long int zero = 0L;
       char *date = NULL;
       request_rec *r = f->r;
  -    char *buff;
  +    char *buff, *buff_start;
       ap_bucket *e;
       ap_bucket_brigade *b2;
       apr_size_t len = 0;
  @@ -2414,8 +2414,7 @@
        * and the basic http headers don't overflow this buffer.
        */
       len += strlen(ap_get_server_version()) + 100;
  -    buff = apr_pcalloc(r->pool, len);
  -    e = ap_bucket_create_pool(buff, len, r->pool);
  +    buff_start = buff = apr_pcalloc(r->pool, len);
       ap_basic_http_header(r, buff);
       buff += strlen(buff);
   
  @@ -2434,8 +2433,8 @@
       if (r->chunked) {
           ap_bsetflag(r->connection->client, B_CHUNK, 1);
       }
  -    e->length = strlen(buff) + 1;
       b2 = ap_brigade_create(r->pool);
  +    e = ap_bucket_create_pool(buff_start, strlen(buff_start), r->pool);
       AP_BRIGADE_INSERT_HEAD(b2, e);
       ap_remove_output_filter(f);
       ap_pass_brigade(f->next, b2);
  
  
  

Mime
View raw message