]> granicus.if.org Git - apache/commitdiff
Changes to respect the new apr bucket and brigade length types (either
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 24 Jul 2001 20:38:01 +0000 (20:38 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 24 Jul 2001 20:38:01 +0000 (20:38 +0000)
  apr_size_t for bucket lengths, or apr_off_t for aggregate brigade lengths.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89683 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_file_cache.c
modules/generators/mod_asis.c
modules/generators/mod_autoindex.c
modules/http/http_protocol.c
server/core.c

index d29d472027661344c58d1d5b251c9442628f8111..a07d25ca57f75c389ffeca62ef9bc459b3303a11 100644 (file)
@@ -222,7 +222,10 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
 
 #if APR_HAS_MMAP
     if (mmap) {
-         /* MMAPFile directive. MMAP'ing the file */
+        /* MMAPFile directive. MMAP'ing the file
+         * XXX: APR_HAS_LARGE_FILES issue; need to reject this request if
+         * size is greater than MAX(apr_size_t) (perhaps greater than 1M?).
+         */
         if ((rc = apr_mmap_create(&new_file->mm, fd, 0, new_file->finfo.size,
                                   APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) { 
             apr_file_close(fd);
index 63594236d57ab72093dd512fd266fdcc9ea11843..a7520495b4d65cdf7456299ad2c52b75a35682ae 100644 (file)
@@ -118,6 +118,9 @@ static int asis_handler(request_rec *r)
     }
 
     if (!r->header_only) {
+        /* XXX: APR_HAS_LARGE_FILES issue; need to split into mutiple send_fd
+         * chunks, no greater than MAX(apr_size_t).
+         */
        ap_send_fd(f, r, 0, r->finfo.size, &nbytes);
     }
 
index 649f5053ecc5a58e76b8e2e8ca6c83a79bf5fa4a..8906251ddcba49ac68dc8621cb1ee2d8084f93aa 100644 (file)
@@ -703,7 +703,7 @@ struct ent {
     char *icon;
     char *alt;
     char *desc;
-    off_t size;
+    apr_off_t size;
     apr_time_t lm;
     struct ent *next;
     int ascending, version_sort;
index 6bc126e34176482f2276e79c3f2a648a63c91d42..4e1be8ce42e53b7668e6792dba05a1ea8567ed31 100644 (file)
@@ -883,7 +883,7 @@ static void terminate_header(apr_bucket_brigade *bb)
 {
     char tmp[] = "X-Pad: avoid browser bug" CRLF;
     char crlf[] = CRLF;
-    apr_ssize_t len;
+    apr_off_t len;
     apr_size_t buflen;
 
     (void) apr_brigade_length(bb, 1, &len);
@@ -2272,7 +2272,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
     apr_off_t range_end;
     char *current;
     char *bound_head;
-    apr_ssize_t bb_length;
+    apr_off_t bb_length;
     apr_off_t clength = 0;
     apr_status_t rv;
     int found = 0;
index 9cc5d181f7334386f2b5f6bde77afdddce555256..557c800f6cafbe7b88ff8c19a2cfd01651d03b9c 100644 (file)
@@ -2494,7 +2494,7 @@ static apr_status_t writev_it_all(apr_socket_t *s,
     apr_size_t bytes_written = 0;
     apr_status_t rv;
     apr_size_t n = len;
-    apr_size_t i = 0;
+    int i = 0;
 
     *nbytes = 0;
 
@@ -2996,6 +2996,10 @@ static int default_handler(request_rec *r)
     }
 
     bb = apr_brigade_create(r->pool);
+    /* XXX: APR_HAS_LARGE_FILES issue; need to split into mutiple buckets, 
+     * no greater than MAX(apr_size_t), (perhaps more granular than that
+     * in case the brigade code/filters attempt to read it!)
+     */
     e = apr_bucket_file_create(fd, 0, r->finfo.size, r->pool);
 
     APR_BRIGADE_INSERT_HEAD(bb, e);