From: Eric Covener
By default, this directive only affects successful responses (responses
- in the 2xx
range). The optional condition
- can be either onsuccess
(default) or always
(all
- status codes, including successful responses). A value of always
- may be needed to influence headers set by some internal modules even for
- successful responses, and is always needed to affect non-2xx
- responses such as redirects or client errors.
To manipulate headers set by CGI scripts, it is necessary to specify
- always
for the first parameter.
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
+ 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:
always
is used in the ultimate response.always
and not in the default table.onsuccess
condition.The action it performs is determined by the first argument (second argument if a condition is specified).