MINOR: mux-h1: Don't add Connection close/keep-alive header for 1xx messages

No connection header must be added by the H1 mux in 1xx messages, including
101. Existing connection headers remains untouched, especially the "Connection:
upgrade" of 101 responses. This patch only avoids to add "Connection: close" or
"Connection: keep-alive" to 1xx responses.
This commit is contained in:
Christopher Faulet 2020-12-02 16:46:33 +01:00
parent 91fcf21e45
commit f3e7619041

View File

@ -1805,7 +1805,7 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
goto full;
if (sl->flags & HTX_SL_F_XFER_LEN)
h1m->flags |= H1_MF_XFER_LEN;
if (h1s->status < 200 && (h1s->status == 100 || h1s->status >= 102))
if (h1s->status < 200)
h1s->flags |= H1S_F_HAVE_O_CONN;
else if (h1s->status == 204 || h1s->status == 304)
h1s->flags |= H1S_F_BODYLESS_RESP;