Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 80749 invoked from network); 29 Sep 2008 04:34:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 04:34:45 -0000 Received: (qmail 76247 invoked by uid 500); 29 Sep 2008 04:34:33 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 76225 invoked by uid 500); 29 Sep 2008 04:34:33 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 76210 invoked by uid 99); 29 Sep 2008 04:34:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Sep 2008 21:34:33 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.68.5.16] (HELO relay02.pair.com) (209.68.5.16) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 29 Sep 2008 04:33:32 +0000 Received: (qmail 6343 invoked from network); 29 Sep 2008 04:33:04 -0000 Received: from 70.137.166.16 (HELO ?10.0.10.7?) (70.137.166.16) by relay02.pair.com with SMTP; 29 Sep 2008 04:33:04 -0000 X-pair-Authenticated: 70.137.166.16 Message-ID: <48E05A82.7090903@archive.org> Date: Sun, 28 Sep 2008 21:33:06 -0700 From: Gordon Mohr User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: users@httpd.apache.org References: <48E00760.9010401@archive.org> <0AB4FF17-08CE-4E7C-B5C1-46A321051B0B@webthing.com> In-Reply-To: <0AB4FF17-08CE-4E7C-B5C1-46A321051B0B@webthing.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_expires setting unwanted Expires on 5XX status codes Nick Kew wrote: > > On 28 Sep 2008, at 23:38, Gordon Mohr wrote: > >> Using mod_expires in Apache 2.2.X, I want everything *except* 5XX >> status code responses (like 503, service unavailable/busy) to have an >> Expires header added. > > That doesn't make sense. For many response codes, it's just Not > Applicable. For our application, the exceptions to long cacheability are rare -- only (usually-transient) server errors (5XXs). Even 3XX and 4XX responses should be cached a day, or longer. >> I don't see a switch to limit mod_expires by response code. >> >> It looks like a 'Header unset' conditional on the existence of an >> environment variable previously set based on response code could work; >> is there an environment variable set to the about-to-be-returned >> status code, at the time of late mod_headers action? > > You'd have to set the env var after the response was known, too. That can > only happen if the response is known early, and that only happens when > the response is itself generated by server configuration (e.g. a redirect, > or access denied), or if the response is static and local. > > The general-purpose solution is an ErrorDocument. How can the ErrorDocument prevent mod_expires from setting the default Expires value on its 503-contents? Or are ErrorDocuments just exempt from mod_expires action? - Gordon @ IA --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org