With mod_log you can log headers sent back to the client in the access.log file with the %{Set-Cookie}o
directive. But if there are multiple occurences of the same header, as is authorized by the HTTP RPC, only one gets logged.
How can we have all of them logged ?
For reference, the RFC states :
Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)].
Set-Cookie
is such a field-name since the field-value is comma-separated. I would not mind to have them joined together as suggested in the HTTP RPC.
What version of apache? what version of mod_log? The correct answer may be to either file a bug report with apache or patch it in yourself.
Actually, since version 2.0, It works out-of-the-box, except for
Content-type
: every header gets nicely concatenated with a comma as suggested in the HTTP RFC.The "Set-Cookie" response header also has a special treatment as we can see in the
log_header_out
function ofmodules/loggers/mod_log_config.c
: