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 Tue, 31 Oct 2000 19:59:09 GMT
trawick     00/10/31 11:59:09

  Modified:    src/main http_protocol.c
  Log:
  a couple of fixes for byte ranges:
  . use %qx format instead of %llx for 64-bit integer (apr_time_t);
    %llx prints as "%llx"
  . pass offset and length to ap_bucket_create_mmap() so that byte
    ranges work with mmaps (at least for a single range)
  
  Revision  Changes    Path
  1.211     +2 -6      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.210
  retrieving revision 1.211
  diff -u -r1.210 -r1.211
  --- http_protocol.c	2000/10/31 12:30:22	1.210
  +++ http_protocol.c	2000/10/31 19:59:09	1.211
  @@ -311,7 +311,7 @@
           long tlength = 0;
   
           r->byterange = 2;
  -        r->boundary = apr_psprintf(r->pool, "%llx%lx",
  +        r->boundary = apr_psprintf(r->pool, "%qx%lx",
   				r->request_time, (long) getpid());
           while (internal_byterange(0, &tlength, r, &r_range, NULL, NULL));
           apr_table_setn(r->headers_out, "Content-Length",
  @@ -2820,12 +2820,8 @@
       ap_bucket_brigade *bb = NULL;
       ap_bucket *b;
   
  -    /* WE probably need to do something to make sure we are respecting the
  -     * offset and length.  I think I know how to do this, but I will wait
  -     * until after the commit to actually write the code.
  -     */
       bb = ap_brigade_create(r->pool);
  -    b = ap_bucket_create_mmap(mm, 0, mm->size);
  +    b = ap_bucket_create_mmap(mm, offset, length);
       AP_BRIGADE_INSERT_TAIL(bb, b);
       ap_pass_brigade(r->output_filters, bb);
   
  
  
  

Mime
View raw message