httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <b...@wstoddard.com>
Subject Re: [PATCH] mod_cache fixes: #3
Date Mon, 02 Aug 2004 14:35:46 GMT
Justin Erenkrantz wrote:
> --On Sunday, August 1, 2004 11:25 AM -0400 Bill Stoddard 
> <bill@wstoddard.com> wrote:
> 
>> Too many changes in one patch. Break this up into multiple consumable 
>> in 15
>> minute patches and I'll review them.
> 
> 
> * modules/experimental/mod_disk_cache.c: Allow sendfile on cache bodies.
> 

-1, Need to check for EnableSendfile off.


> Index: modules/experimental/mod_disk_cache.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
> retrieving revision 1.52
> diff -u -r1.52 mod_disk_cache.c
> --- modules/experimental/mod_disk_cache.c    18 Mar 2004 21:40:12 
> -0000    1.52
> +++ modules/experimental/mod_disk_cache.c    1 Aug 2004 08:24:52 -0000
> @@ -370,6 +374,7 @@
>     cache_object_t *obj;
>     cache_info *info;
>     disk_cache_object_t *dobj;
> +    int flags;
> 
>     h->cache_obj = NULL;
> 
> @@ -393,14 +399,18 @@
>                           conf->cache_root, key);
> 
>     /* Open the data file */
> -    rc = apr_file_open(&fd, data, APR_READ|APR_BINARY, 0, r->pool);
> +    flags = APR_READ|APR_BINARY;
> +#ifdef APR_SENDFILE_ENABLED
> +    flags |= APR_SENDFILE_ENABLED;
> +#endif
> +    rc = apr_file_open(&fd, data, flags, 0, r->pool);
>     if (rc != APR_SUCCESS) {
>         /* XXX: Log message */
>         return DECLINED;
>     }
> 
>     /* Open the headers file */
> -    rc = apr_file_open(&hfd, headers, APR_READ|APR_BINARY, 0, r->pool);
> +    rc = apr_file_open(&hfd, headers, flags, 0, r->pool);
>     if (rc != APR_SUCCESS) {
>         /* XXX: Log message */
>         return DECLINED;
> 


Mime
View raw message