https://issues.apache.org/bugzilla/show_bug.cgi?id=54179
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
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Created attachment 29616
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29616&action=edit
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 9.9.9.5:29835] mod_dumpio: dumpio_out (data-HEAP):
204 bytes
mod_dumpio.c(103): [client 9.9.9.5:29835] 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 9.9.9.5:29835] mod_dumpio: dumpio_out
mod_dumpio.c(63): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
(data-TRANSIENT): 1163 bytes
mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
(data-TRANSIENT): <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message>part
mod_dumpio.c(63): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
(data-TRANSIENT): 4044 bytes
mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
(data-TRANSIENT): //www.w3.org/2001/XMLSchema-instance"><bigmessage>message
part 1 .... </bigmessage
mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
(data-TRANSIENT): //www.w3.org/2001/XMLSchema-instance"><bigmessage>message
part 1 .... </bigmessage
mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
(data-TRANSIENT): //www.w3.org/2001/XMLSchema-instance"><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: [email protected]
For additional commands, e-mail: [email protected]