diff --git a/src/mux_h2.c b/src/mux_h2.c index dfd437e70..1150660b9 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1701,7 +1701,9 @@ static int h2c_frt_recv_preface(struct h2c *h2c) if (ret1 < 0 || conn_xprt_read0_pending(h2c->conn)) { TRACE_ERROR("I/O error or short read", H2_EV_RX_FRAME|H2_EV_RX_PREFACE, h2c->conn); h2c_error(h2c, H2_ERR_PROTOCOL_ERROR); - HA_ATOMIC_INC(&h2c->px_counters->conn_proto_err); + if (b_data(&h2c->dbuf) || + !(((const struct session *)h2c->conn->owner)->fe->options & PR_O_IGNORE_PRB)) + HA_ATOMIC_INC(&h2c->px_counters->conn_proto_err); } ret2 = 0; goto out; @@ -3128,7 +3130,9 @@ static void h2_process_demux(struct h2c *h2c) if (h2c->st0 == H2_CS_ERROR) { TRACE_PROTO("failed to receive preface", H2_EV_RX_PREFACE|H2_EV_PROTO_ERR, h2c->conn); h2c->st0 = H2_CS_ERROR2; - sess_log(h2c->conn->owner); + if (b_data(&h2c->dbuf) || + !(((const struct session *)h2c->conn->owner)->fe->options & PR_O_IGNORE_PRB)) + sess_log(h2c->conn->owner); } goto fail; }