Cookie variable in Apache LogFormat outputs incorrect value
Bug #815865 reported by
Richard Mitchell
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apache2 Web Server |
Unknown
|
Unknown
|
|||
apache2 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Won't Fix
|
Medium
|
Unassigned | ||
Maverick |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Given the example request:
{{{
GET / HTTP/1.1
Host: example.com
Cookie: __foo_bar="baz"; __foo="quux
"
}}}
and the Apache configuration:
{{{
LogFormat "\"%r\" %>s \"%{__foo}C\" \"%{__foo_bar}C\"" mylogformat
CustomLog /path/to/log mylogformat
}}}
Then the relevant entry in /path/to/log will be:
{{{
"GET / HTTP/1.1" 200 "bar=\"baz\"" "\"baz\""
}}}
when it ought to read:
{{{
"GET / HTTP/1.1" 200 "\"quux\"" "\"baz\""
}}}
{{{
$ apache2 -v
Server version: Apache/2.2.12 (Ubuntu)
Server built: Nov 18 2010 21:16:51
}}}
To post a comment you must log in.
(Ignore the newline after 'quux' in the example request)