From: Christopher Faulet Date: Mon, 10 Dec 2018 10:21:47 +0000 (+0100) Subject: BUG/MINOR: mux-h1: Fix conn_mode processing for headerless outgoing messages X-Git-Tag: v1.9-dev11~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de68b1351f515559ca561e2d49beca3b1fdd163e;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Fix conn_mode processing for headerless outgoing messages Condition to process the connection mode on outgoing messages whithout 'Connection' header was wrong. It relied on the wrong H1M state. H1_MSG_HDR_L2_LWS is only a possible state for messages with at least one header. Now, to fix the bug, we just check the H1M state is not H1_MSG_LAST_LF. So, we have the warranty the EOH was not processed yet. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 90e6ff9fe5..e29e235c77 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1434,7 +1434,7 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun break; case HTX_BLK_EOH: - if (h1m->state == H1_MSG_HDR_L2_LWS && process_conn_mode) { + if (h1m->state != H1_MSG_LAST_LF && process_conn_mode) { /* There is no "Connection:" header and * it the conn_mode must be * processed. So do it */