From d87d3fab25b3795a74ace2cf2ee16d4516e7a9c0 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 26 Jun 2019 15:16:28 +0200 Subject: [PATCH] BUG/MINOR: mux-h1: Make format errors during output formatting fatal These errors are unexpected at this staged and there is not much more to do than to close the connection and leave. So now, when it happens, the flag H1C_F_CS_ERROR is set on the H1 connection and the flag HTX_FL_PARSING_ERROR is set on the channel's HTX message. This patch must be backported to 2.0 and 1.9. --- src/mux_h1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mux_h1.c b/src/mux_h1.c index 78145df5c..3d2bd8b87 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1740,7 +1740,10 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun default: error: + /* Unexpected error during output processing */ + chn_htx->flags |= HTX_FL_PARSING_ERROR; h1s->flags |= errflag; + h1c->flags |= H1C_F_CS_ERROR; break; }