httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 13 Sep 2004 13:16:33 GMT
jorton      2004/09/13 06:16:33

  Modified:    server   core.c
  Log:
  * server/core.c (default_handler): Fix the test for whether to split a
  file into several buckets: it is needed regardless of whether sendfile
  is enabled, and APR_HAS_LARGE_FILES is not sufficient to determine
  whether sizeof(apr_off_t) is greater than sizeof(apr_off_t).
  
  PR: 28898
  
  Revision  Changes    Path
  1.284     +7 -12     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.283
  retrieving revision 1.284
  diff -d -w -u -r1.283 -r1.284
  --- core.c	17 Jul 2004 08:29:48 -0000	1.283
  +++ core.c	13 Sep 2004 13:16:32 -0000	1.284
  @@ -3681,17 +3681,13 @@
           }
   
           bb = apr_brigade_create(r->pool, c->bucket_alloc);
  -#if APR_HAS_LARGE_FILES
  -#if APR_HAS_SENDFILE
  -        if ((d->enable_sendfile != ENABLE_SENDFILE_OFF) &&
  -#else
  -        if (
  -#endif
  -            (r->finfo.size > AP_MAX_SENDFILE)) {
  -            /* APR_HAS_LARGE_FILES issue; must split into mutiple buckets,
  -             * no greater than MAX(apr_size_t), and more granular than that
  -             * in case the brigade code/filters attempt to read it directly.
  -             */
  +
  +        /* For platforms where the size of the file may be larger than
  +         * that which can be stored in a single bucket (whether the
  +         * length field is an apr_size_t), split it into several
  +         * buckets */
  +        if (sizeof(apr_off_t) > sizeof(apr_size_t) 
  +            && r->finfo.size > AP_MAX_SENDFILE) {
               apr_off_t fsize = r->finfo.size;
               e = apr_bucket_file_create(fd, 0, AP_MAX_SENDFILE, r->pool,
                                          c->bucket_alloc);
  @@ -3705,7 +3701,6 @@
               e->length = (apr_size_t)fsize; /* Resize just the last bucket */
           }
           else
  -#endif
               e = apr_bucket_file_create(fd, 0, (apr_size_t)r->finfo.size,
                                          r->pool, c->bucket_alloc);
   
  
  
  

Mime
View raw message