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 15:46:54 GMT
Brian Akins wrote:

> Bill Stoddard wrote:
> 
>>     /* 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);
>>
>>
> 
> Should be something like this adapted from core:
> 
> core_dir_config *core_config;
> 
> core_config = (core_dir_config *) ap_get_module_config(r->per_dir_config,
>                                                           &core_module);
> 
> 
> if ((rv = apr_file_open(&hfd, data, APR_READ | APR_BINARY
> #if APR_HAS_SENDFILE
>                            |
>                            ((core_config->enable_sendfile ==
>                              ENABLE_SENDFILE_OFF)
>                             ? 0 : APR_SENDFILE_ENABLED)
> #endif
>                            , 0, r->pool)) != APR_SUCCESS)
>    {
> 

EnableSendfile off is a global directive (?) so only need to check it once at startup and
save it in a static 
variable?

Bill


Mime
View raw message