From: Christopher Faulet Date: Wed, 26 Jun 2019 13:16:28 +0000 (+0200) Subject: BUG/MINOR: mux-h1: Make format errors during output formatting fatal X-Git-Tag: v2.1-dev1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87d3fab25b3795a74ace2cf2ee16d4516e7a9c0;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 78145df5c5..3d2bd8b877 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; }