Return-Path:
X-Original-To: apmail-httpd-cvs-archive@www.apache.org
Delivered-To: apmail-httpd-cvs-archive@www.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 049BE11C04
for ;
Thu, 10 Apr 2014 19:35:06 +0000 (UTC)
Received: (qmail 26335 invoked by uid 500); 10 Apr 2014 19:35:04 -0000
Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org
Received: (qmail 26049 invoked by uid 500); 10 Apr 2014 19:35:03 -0000
Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm
Precedence: bulk
Reply-To: dev@httpd.apache.org
list-help:
list-unsubscribe:
List-Post:
List-Id:
Delivered-To: mailing list cvs@httpd.apache.org
Received: (qmail 25930 invoked by uid 99); 10 Apr 2014 19:35:02 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2014 19:35:02 +0000
X-ASF-Spam-Status: No, hits=-2000.0 required=5.0
tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2014 19:35:00 +0000
Received: from eris.apache.org (localhost [127.0.0.1])
by eris.apache.org (Postfix) with ESMTP id B0E992388A56;
Thu, 10 Apr 2014 19:34:40 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r1586444 -
/httpd/httpd/trunk/docs/manual/mod/mod_headers.html.en
Date: Thu, 10 Apr 2014 19:34:40 -0000
To: cvs@httpd.apache.org
From: covener@apache.org
X-Mailer: svnmailer-1.0.9
Message-Id: <20140410193440.B0E992388A56@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Author: covener
Date: Thu Apr 10 19:34:40 2014
New Revision: 1586444
URL: http://svn.apache.org/r1586444
Log:
xforms
Modified:
httpd/httpd/trunk/docs/manual/mod/mod_headers.html.en
Modified: httpd/httpd/trunk/docs/manual/mod/mod_headers.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_headers.html.en?rev=1586444&r1=1586443&r2=1586444&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_headers.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_headers.html.en Thu Apr 10 19:34:40 2014
@@ -194,6 +194,12 @@ Header merge Cache-Control no-store env=
Header set Set-Cookie testcookie "expr=-z %{req:Cookie}"
+
+ Append a Caching header for responses with a HTTP status code of 200
+ Header append Cache-Control s-maxage=600 "expr=%{REQUEST_STATUS} == 200"
+
+
+
@@ -216,22 +222,22 @@ Header merge Cache-Control no-store env=
modified.
The optional condition argument determines which internal
- table of responses headers this directive will operate against. Other
- components of the server may have stored their response headers in either
- the table that corresponds to onsuccess
or the table that
- corresponds to always
. "Always" in this context refers to
- whether headers you add will be sent during both a successful and unsucessful
- response, but if your action is a function of an existing header, you
- will have to read on for further complications.
-
- The default value of onsuccess
may need to be changed to
- always
under the circumstances similar to those listed below.
+ table of responses headers this directive will operate against. Despite the
+ name, the default value of onsuccess
does not limit
+ an action to responses with a 2xx status code. Headers set under
+ this condition are still used when, for example, a request is successfully
+ proxied or generated by CGI, even when they have generated a failing status code.
+
+ When your action is a function of an existing header, you may need to specify
+ a condition of always
, depending on which internal table the
+ original header was set in. The table that corresponds to always
is
+ used for locally generated error responses as well as successful responses.
Note also that repeating this directive with both conditions makes sense in
some scenarios because always
is not a superset of
onsuccess
with respect to existing headers:
- - You're adding a header to a non-success (non-2xx) response, such
+
- You're adding a header to a locally generated non-success (non-2xx) response, such
as a redirect, in which case only the table corresponding to
always
is used in the ultimate response.
- You're modifying or removing a header generated by a CGI script,
@@ -242,6 +248,10 @@ Header merge Cache-Control no-store env=
onsuccess
condition.
+ Separately from the condition paramete described above, you
+ can limit an action based on HTTP status codes for e.g. proxied or CGI
+ requests. See the example that uses %{REQUEST_STATUS} in the section above.
+
The action it performs is determined by the first
argument (second argument if a condition is specified).
This can be one of the following values:
@@ -394,8 +404,10 @@ Header merge Cache-Control no-store env=
Except in early mode, the
Header
directives are processed just
before the response is sent to the network. These means that it is
- possible to set and/or override most headers, except for those headers
- added by the HTTP header filter, such as Content-Type.
+ possible to set and/or override most headers, except for some headers
+ added by the HTTP header filter. Prior to 2.2.12, it was not possible
+ to change the Content-Type header with this directive.
+