https://issues.apache.org/bugzilla/show_bug.cgi?id=53104

             Bug #: 53104
           Summary: LogFormat "%{xyz}C" truncates cookie content at '='
                    character
           Product: Apache httpd-2
           Version: 2.2.22
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_log_config
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


When using the '%{xyz}C' syntax to include the content of a specific named
cookie in a LogFormat definition, log lines describing requests in which the
cookie's content contains an '=' (equals sign) character will truncate the
printed cookie content at the first '=' character. A conversation with sfritsch
on #httpd-dev suggests that this may have cropped up as an unintended
consequence of changes that were made to resolve PR 28037. Details follow;
please let me know if there's anything else I can do to help clarify this
issue.

------------------
Steps to Reproduce
------------------

httpd.conf (excerpt):
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
\"__utma=%{__utma}C; __utmb=%{__utmb}C; __utmc=%{__utmc}C; __utmk=%{__utmk}C;
__utmx=%{__utmx}C; __utmz=%{__utmz}C;\"" cookie_combined

Request Cookie header (excerpt):
__utmz='153100668.1330388151.35.11.utmccn=(referral)|utmcsr=somedomain.net|utmcct=/src/login.php|utmcmd=referral'

--------------
Actual Results
--------------

Access log (excerpt):
10.0.0.1 - - [18/Apr/2012:10:12:56 -0700] "GET / HTTP/1.1" 200 32440 "-"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/536.6 (KHTML, like
Gecko) Chrome/20.0.1096.1 Safari/536.6"
"__utma=153100668.1659089300.1323803112.1334623621.1334626164.51; __utmb=-;
__utmc=-; __utmk=-; __utmx=-; __utmz=153100668.1330388151.35.11.utmccn;"

----------------
Expected Results
----------------

Access log (excerpt):
10.0.0.1 - - [18/Apr/2012:10:12:56 -0700] "GET / HTTP/1.1" 200 32440 "-"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/536.6 (KHTML, like
Gecko) Chrome/20.0.1096.1 Safari/536.6"
"__utma=153100668.1659089300.1323803112.1334623621.1334626164.51; __utmb=-;
__utmc=-; __utmk=-; __utmx=-;
__utmz=153100668.1330388151.35.11.utmccn=(referral)|utmcsr=somedomain.net|utmcct=/src/login.php|utmcmd=referral;"

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]

Reply via email to