[BUG] debug: correctly report truncated messages

By using msg->sol as the beginning of a message, wrong messages were
displayed in debug mode when they were truncated on the last line,
because msg->sol points to the beginning of the last line. Use
data+msg->som instead.
This commit is contained in:
Willy Tarreau 2010-06-07 14:06:08 +02:00
parent 1ba0e5f451
commit 663308bea1
1 changed files with 2 additions and 2 deletions

View File

@ -2413,7 +2413,7 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit)
(msg->msg_state >= HTTP_MSG_BODY || msg->msg_state == HTTP_MSG_ERROR))) {
char *eol, *sol;
sol = msg->sol;
sol = req->data + msg->som;
eol = sol + msg->sl.rq.l;
debug_hdr("clireq", s, sol, eol);
@ -4337,7 +4337,7 @@ int http_wait_for_response(struct session *s, struct buffer *rep, int an_bit)
(msg->msg_state >= HTTP_MSG_BODY || msg->msg_state == HTTP_MSG_ERROR))) {
char *eol, *sol;
sol = msg->sol;
sol = rep->data + msg->som;
eol = sol + msg->sl.st.l;
debug_hdr("srvrep", s, sol, eol);