From 663308bea1ec769cb5e560b11eeec7be055b83ab Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 7 Jun 2010 14:06:08 +0200 Subject: [PATCH] [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. --- src/proto_http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index ad95e569b9..5471ab5c24 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -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);