mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MINOR: mux-h1: Report an error to the SE descriptor on truncated message
On truncated message, a parsing error is still reported. But an error on the SE descriptor is also reported. This will avoid any bugs in future. We are know sure the SC is able to detect the error, independently on the HTTP analyzers.
This commit is contained in:
parent
88dd0b0d13
commit
e9bacf642d
@ -1916,16 +1916,11 @@ static size_t h1_process_demux(struct h1c *h1c, struct buffer *buf, size_t count
|
||||
TRACE_STATE("report EOI to SE", H1_EV_RX_DATA, h1c->conn, h1s);
|
||||
}
|
||||
else if (h1m->state < H1_MSG_DONE) {
|
||||
if (h1m->state > H1_MSG_LAST_LF) {
|
||||
if (h1m->state <= H1_MSG_LAST_LF && b_data(&h1c->ibuf))
|
||||
htx->flags |= HTX_FL_PARSING_ERROR;
|
||||
se_fl_set(h1s->sd, SE_FL_ERROR);
|
||||
TRACE_ERROR("message aborted, set error on SC", H1_EV_RX_DATA|H1_EV_H1S_ERR, h1c->conn, h1s);
|
||||
}
|
||||
else if (b_data(&h1c->ibuf)) {
|
||||
htx->flags |= HTX_FL_PARSING_ERROR;
|
||||
TRACE_ERROR("truncated message, set error on SC", H1_EV_RX_DATA|H1_EV_H1S_ERR, h1c->conn, h1s);
|
||||
}
|
||||
/* Otherwise (no data was never received) don't report any error just EOS */
|
||||
}
|
||||
|
||||
if (h1s->flags & H1S_F_TX_BLK) {
|
||||
h1s->flags &= ~H1S_F_TX_BLK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user