From 0709cce293bba1ff79a6acc8b1c71db44ed5adea Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sat, 3 Aug 2002 22:39:42 +0000 Subject: [PATCH] We describe body lengths throughout apr in apr_off_t lengths. While we all agree we won't ever cache an entity that huge in memory, the disk cache is another matter [e.g. if we cache an existing file.] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96302 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/cache_storage.c | 4 ++-- modules/experimental/mod_cache.c | 2 +- modules/experimental/mod_cache.h | 4 ++-- modules/experimental/mod_disk_cache.c | 2 +- modules/experimental/mod_mem_cache.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/experimental/cache_storage.c b/modules/experimental/cache_storage.c index b4b0d77d39..aeef53419a 100644 --- a/modules/experimental/cache_storage.c +++ b/modules/experimental/cache_storage.c @@ -108,7 +108,7 @@ int cache_remove_url(request_rec *r, const char *types, char *url) * decide whether or not it wants to cache this particular entity. * If the size is unknown, a size of -1 should be set. */ -int cache_create_entity(request_rec *r, const char *types, char *url, apr_size_t size) +int cache_create_entity(request_rec *r, const char *types, char *url, apr_off_t size) { cache_handle_t *h = apr_pcalloc(r->pool, sizeof(cache_handle_t)); const char *next = types; @@ -300,7 +300,7 @@ apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(cache, CACHE, int, create_entity, (cache_handle_t *h, request_rec *r, const char *type, - const char *urlkey, apr_size_t len), + const char *urlkey, apr_off_t len), (h, r, type,urlkey,len),DECLINED) APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(cache, CACHE, int, open_entity, (cache_handle_t *h, request_rec *r, const char *type, diff --git a/modules/experimental/mod_cache.c b/modules/experimental/mod_cache.c index 26b4fab7a2..70d50e883a 100644 --- a/modules/experimental/mod_cache.c +++ b/modules/experimental/mod_cache.c @@ -409,7 +409,7 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in) const char *cc_out = apr_table_get(r->headers_out, "Cache-Control"); const char *exps, *lastmods, *dates, *etag; apr_time_t exp, date, lastmod, now; - apr_size_t size; + apr_off_t size; cache_info *info; void *sconf = r->server->module_config; cache_server_conf *conf = diff --git a/modules/experimental/mod_cache.h b/modules/experimental/mod_cache.h index 870b60b144..66fae17efb 100644 --- a/modules/experimental/mod_cache.h +++ b/modules/experimental/mod_cache.h @@ -268,7 +268,7 @@ CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list, cons * cache_storage.c */ int cache_remove_url(request_rec *r, const char *types, char *url); -int cache_create_entity(request_rec *r, const char *types, char *url, apr_size_t size); +int cache_create_entity(request_rec *r, const char *types, char *url, apr_off_t size); int cache_remove_entity(request_rec *r, const char *types, cache_handle_t *h); int cache_select_url(request_rec *r, const char *types, char *url); apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key ); @@ -310,7 +310,7 @@ apr_status_t cache_read_entity_body(cache_handle_t *h, apr_pool_t *p, apr_bucket APR_DECLARE_EXTERNAL_HOOK(cache, CACHE, int, create_entity, (cache_handle_t *h, request_rec *r, const char *type, - const char *urlkey, apr_size_t len)) + const char *urlkey, apr_off_t len)) APR_DECLARE_EXTERNAL_HOOK(cache, CACHE, int, open_entity, (cache_handle_t *h, request_rec *r, const char *type, const char *urlkey)) diff --git a/modules/experimental/mod_disk_cache.c b/modules/experimental/mod_disk_cache.c index 38e5b448e8..e9e9bb9f9d 100644 --- a/modules/experimental/mod_disk_cache.c +++ b/modules/experimental/mod_disk_cache.c @@ -312,7 +312,7 @@ static int file_cache_write_mydata(apr_file_t *fd , cache_handle_t *h, request_r static int create_entity(cache_handle_t *h, request_rec *r, const char *type, const char *key, - apr_size_t len) + apr_off_t len) { disk_cache_conf *conf = ap_get_module_config(r->server->module_config, &disk_cache_module); diff --git a/modules/experimental/mod_mem_cache.c b/modules/experimental/mod_mem_cache.c index f3f9c2bc2d..a2990ab58d 100644 --- a/modules/experimental/mod_mem_cache.c +++ b/modules/experimental/mod_mem_cache.c @@ -431,7 +431,7 @@ static void *create_cache_config(apr_pool_t *p, server_rec *s) static int create_entity(cache_handle_t *h, request_rec *r, const char *type, const char *key, - apr_size_t len) + apr_off_t len) { cache_object_t *obj, *tmp_obj; mem_cache_object_t *mobj; -- 2.40.0