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.
This commit is contained in:
Christopher Faulet 2018-12-10 11:21:47 +01:00 committed by Willy Tarreau
parent ac77b6f441
commit de68b1351f

View File

@ -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 */