https://bz.apache.org/bugzilla/show_bug.cgi?id=62384
Bug ID: 62384
Summary: %{VARNAME}i in Logformat ignores comma immediately
following the variable
Product: Apache httpd-2
Version: 2.4.23
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_log_config
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
In fact I believe it ignores anything but a space.
Using the following LogFormat:
LogFormat '"%t", %h, %{Authorization}i, %H, %m, "%U", "%q", %>s, %b,
"%{User-agent}i"'
gives the following results:
1) When an authorization header exists:
"[18/May/2018:10:21:07 +0200]", 1.2.3.4, user HTTP/1.1, GET, "/path/to/file",
"", 200, 374, "Wget/1.18 (linux-gnu)"
2) When no authorization header exists:
"[18/May/2018:10:21:07 +0200]", 1.2.3.4, -, HTTP/1.1, GET, "/path/to/file", "",
200, 374, "Wget/1.18 (linux-gnu)"
Note that in the first example the comma following the authorization header
value is missing!
If you define the log format as follows:
LogFormat '"%t", %h, %{Authorization}i , %H, %m, "%U", "%q", %>s, %b,
"%{User-agent}i"'
then it will successfully write the comma, but there will be a space
(obviously)
"[18/May/2018:10:21:07 +0200]", 1.2.3.4, user , HTTP/1.1, GET, "/path/to/file",
"", 200, 374, "Wget/1.18 (linux-gnu)"
It should be possible to use another delimiter than a space everywhere...
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]