You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2018/05/18 08:48:20 UTC

[Bug 62384] New: %{VARNAME}i in Logformat ignores comma immediately following the variable

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: bugs@httpd.apache.org
          Reporter: jm+asfbugzilla@roth.lu
  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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62384] %{VARNAME}i in Logformat ignores comma immediately following the variable

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62384

jm+asfbugzilla@roth.lu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from jm+asfbugzilla@roth.lu ---
Forget it. My bad. There's more to this: there's a customlog directive with a
pipe to a script here. I think the script is swallowing the separator. Sorry...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org