httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54179] New: Large message improper logging
Date Wed, 21 Nov 2012 10:36:40 GMT

            Bug ID: 54179
           Summary: Large message improper logging
           Product: Apache httpd-2
           Version: 2.4.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: mod_dumpio
    Classification: Unclassified

Created attachment 29616
simple patch - to review, not to use

When large message is logged by moddumpio message is divided in parts
(MAX_STRING_LEN / 4 - 80 -> length of a message) and logged by ap_log_cerror()
function. When message is divided its always logged from the beggining so part
of a message is lost, example log(edited):

 mod_dumpio.c(63): [client] mod_dumpio:  dumpio_out (data-HEAP):
204 bytes
 mod_dumpio.c(103): [client] mod_dumpio:  dumpio_out (data-HEAP):
HTTP/1.1 200 OK\r\nDate: Tue, 20 Nov 2012 09:49:33 GMT\r\nServer: WebSphere
Application Server/6.1\r\nContent-Type: text/xml;
charset=utf-8\r\nContent-Language: en-US\r\nContent-Length:
25709\r\nConnection: close\r\n\r\n
 mod_dumpio.c(161): [client] mod_dumpio: dumpio_out
 mod_dumpio.c(63): [client] mod_dumpio:  dumpio_out
(data-TRANSIENT): 1163 bytes
 mod_dumpio.c(103): [client] mod_dumpio:  dumpio_out
(data-TRANSIENT): <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
 mod_dumpio.c(63): [client] mod_dumpio:  dumpio_out
(data-TRANSIENT): 4044 bytes
 mod_dumpio.c(103): [client] mod_dumpio:  dumpio_out
(data-TRANSIENT): //"><bigmessage>message
part 1 .... </bigmessage
 mod_dumpio.c(103): [client] mod_dumpio:  dumpio_out
(data-TRANSIENT): //"><bigmessage>message
part 1 .... </bigmessage
 mod_dumpio.c(103): [client] mod_dumpio:  dumpio_out
(data-TRANSIENT): //"><bigmessage>message
part 1 .... </bigmessage

message part 1 was logged 3 times, no message part 2 and 3 will be logged.

Probable cause:
ap_log_cerror call in dumpit function shouldn't be made with &buf as a
parameter because it will allways result in a message log made from the
beggining of a message. Pointer to message passed to ap_log_cerror must be
incremented by the value of previously logged message length. 

Im attaching patch which is working for us but it was not written by C
proggramer so it shoutldn't be used :)

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message