]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Make format errors during output formatting fatal
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Jun 2019 13:16:28 +0000 (15:16 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Jun 2019 13:23:06 +0000 (15:23 +0200)
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

index 78145df5c583e265ee58f6bf16788238042b832e..3d2bd8b87750ea83638ea29da75f5f8ec8cd8756 100644 (file)
@@ -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;
                }