-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_headers: Add 'Header note header-name note-name' for copying a response
+ headers value into a note. [Eric Covener]
+
*) WinNT MPM: Don't crash during child process initialization if the
Listen protocol is unrecognized. [Jeff Trawick]
*) AIX: Install DSO's with "cp" instead of "install" in instdso.sh
[Eric Covener]
- *) mod_ldap: Retry transient LDAP connection errors when they occur
- during the authorization stage.
- [Eric Covener]
-
*) mod_ldap: Don't keep retrying if a new LDAP connection times out.
[Eric Covener]
<directivesynopsis>
<name>Header</name>
<description>Configure HTTP response headers</description>
-<syntax>Header [<var>condition</var>] add|append|echo|edit|edit*|merge|set|unset
+<syntax>Header [<var>condition</var>] add|append|echo|edit|edit*|merge|set|unset|note
<var>header</var> [<var>value</var>] [<var>replacement</var>]
[early|env=[!]<var>variable</var>]|expr=<var>expression</var>]
</syntax>
<dd>The response header of this name is removed, if it exists.
If there are multiple headers of the same name, all will be
removed. <var>value</var> must be omitted.</dd>
+
+ <dt><code>note</code></dt>
+ <dd>The value of the named response <var>header</var> is copied into an
+ internal note whose name is given by <var>value</var>. This is useful
+ if a header sent by a CGI or proxied resource is configured to be unset
+ but should also be logged.</dd>
+
</dl>
<p>This argument is followed by a <var>header</var> name, which
hdr_unset = 'u', /* unset header */
hdr_echo = 'e', /* echo headers from request to response */
hdr_edit = 'r', /* change value by regexp, match once */
- hdr_edit_r = 'R', /* change value by regexp, everymatch */
- hdr_setifempty = 'i' /* set value if header not already present*/
+ hdr_edit_r = 'R', /* change value by regexp, everymatch */
+ hdr_setifempty = 'i', /* set value if header not already present*/
+ hdr_note = 'n' /* set value of header in a note */
} hdr_actions;
/*
new->action = hdr_edit;
else if (!strcasecmp(action, "edit*"))
new->action = hdr_edit_r;
+ else if (!strcasecmp(action, "note"))
+ new->action = hdr_note;
else
return "first argument must be 'add', 'set', 'setifempty', 'append', 'merge', "
- "'unset', 'echo', 'edit', or 'edit*'.";
+ "'unset', 'echo', 'note', 'edit', or 'edit*'.";
if (new->action == hdr_edit || new->action == hdr_edit_r) {
if (subs == NULL) {
apr_table_do(add_them_all, (void *) headers, ed.t, NULL);
}
break;
+ case hdr_note:
+ apr_table_setn(r->notes, process_tags(hdr, r), apr_table_get(headers, hdr->header));
+ break;
+
}
}
return 1;