Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 1344 invoked from network); 2 Aug 2004 15:47:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Aug 2004 15:47:31 -0000 Received: (qmail 93813 invoked by uid 500); 2 Aug 2004 15:47:24 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 93697 invoked by uid 500); 2 Aug 2004 15:47:23 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 93653 invoked by uid 99); 2 Aug 2004 15:47:23 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [204.146.167.214] (HELO Boron.MeepZor.Com) (204.146.167.214) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 02 Aug 2004 08:47:23 -0700 Received: from [9.37.243.136] (dmz-firewall [206.199.198.4]) by Boron.MeepZor.Com (8.11.6/8.11.6) with ESMTP id i72FlNO16990 for ; Mon, 2 Aug 2004 11:47:23 -0400 Message-ID: <410E61EE.3060101@wstoddard.com> Date: Mon, 02 Aug 2004 11:46:54 -0400 From: Bill Stoddard User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [PATCH] mod_cache fixes: #3 References: <40B25DBF8F84D316162D79F8@[10.0.1.74]> <410D0B83.9040100@wstoddard.com> <410E5142.3050501@wstoddard.com> <410E5581.8050200@web.turner.com> In-Reply-To: <410E5581.8050200@web.turner.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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