mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-17 19:16:56 +00:00
[BUG] log response byte count, not request
Due to a shameless copy-paste typo, the number of bytes logged was from the request and not the response. This bug has been present for a long time.
This commit is contained in:
parent
ced27013b6
commit
8b3977ffe3
@ -367,7 +367,7 @@ void tcp_sess_log(struct session *s)
|
|||||||
(s->logs.t_queue >= 0) ? s->logs.t_queue : -1,
|
(s->logs.t_queue >= 0) ? s->logs.t_queue : -1,
|
||||||
(s->logs.t_connect >= 0) ? s->logs.t_connect - s->logs.t_queue : -1,
|
(s->logs.t_connect >= 0) ? s->logs.t_connect - s->logs.t_queue : -1,
|
||||||
(tolog & LW_BYTES) ? "" : "+", s->logs.t_close,
|
(tolog & LW_BYTES) ? "" : "+", s->logs.t_close,
|
||||||
(tolog & LW_BYTES) ? "" : "+", s->logs.bytes_in,
|
(tolog & LW_BYTES) ? "" : "+", s->logs.bytes_out,
|
||||||
sess_term_cond[(s->flags & SN_ERR_MASK) >> SN_ERR_SHIFT],
|
sess_term_cond[(s->flags & SN_ERR_MASK) >> SN_ERR_SHIFT],
|
||||||
sess_fin_state[(s->flags & SN_FINST_MASK) >> SN_FINST_SHIFT],
|
sess_fin_state[(s->flags & SN_FINST_MASK) >> SN_FINST_SHIFT],
|
||||||
actconn, fe->feconn, be->beconn, s->srv ? s->srv->cur_sess : 0,
|
actconn, fe->feconn, be->beconn, s->srv ? s->srv->cur_sess : 0,
|
||||||
|
@ -784,7 +784,7 @@ static void http_sess_log(struct session *s)
|
|||||||
(s->logs.t_data >= 0) ? s->logs.t_data - s->logs.t_connect : -1,
|
(s->logs.t_data >= 0) ? s->logs.t_data - s->logs.t_connect : -1,
|
||||||
(tolog & LW_BYTES) ? "" : "+", s->logs.t_close,
|
(tolog & LW_BYTES) ? "" : "+", s->logs.t_close,
|
||||||
txn->status,
|
txn->status,
|
||||||
(tolog & LW_BYTES) ? "" : "+", s->logs.bytes_in,
|
(tolog & LW_BYTES) ? "" : "+", s->logs.bytes_out,
|
||||||
txn->cli_cookie ? txn->cli_cookie : "-",
|
txn->cli_cookie ? txn->cli_cookie : "-",
|
||||||
txn->srv_cookie ? txn->srv_cookie : "-",
|
txn->srv_cookie ? txn->srv_cookie : "-",
|
||||||
sess_term_cond[(s->flags & SN_ERR_MASK) >> SN_ERR_SHIFT],
|
sess_term_cond[(s->flags & SN_ERR_MASK) >> SN_ERR_SHIFT],
|
||||||
@ -3129,12 +3129,11 @@ int process_srv(struct session *t)
|
|||||||
bytes from the server, then this is the right moment. */
|
bytes from the server, then this is the right moment. */
|
||||||
if (t->fe->to_log && !(t->logs.logwait & LW_BYTES)) {
|
if (t->fe->to_log && !(t->logs.logwait & LW_BYTES)) {
|
||||||
t->logs.t_close = t->logs.t_data; /* to get a valid end date */
|
t->logs.t_close = t->logs.t_data; /* to get a valid end date */
|
||||||
t->logs.bytes_in = txn->rsp.eoh;
|
t->logs.bytes_out = txn->rsp.eoh;
|
||||||
if (t->fe->to_log & LW_REQ)
|
if (t->fe->to_log & LW_REQ)
|
||||||
http_sess_log(t);
|
http_sess_log(t);
|
||||||
else
|
else
|
||||||
tcp_sess_log(t);
|
tcp_sess_log(t);
|
||||||
t->logs.bytes_in = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: we must not try to cheat by jumping directly to DATA,
|
/* Note: we must not try to cheat by jumping directly to DATA,
|
||||||
|
Loading…
Reference in New Issue
Block a user