From: Willy Tarreau Date: Mon, 8 Oct 2018 07:43:03 +0000 (+0200) Subject: MINOR: h2: don't try to send data before preface X-Git-Tag: v1.9-dev4~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6bf641a61dd00a2e4e60790e59c8bd1696c0163c;p=thirdparty%2Fhaproxy.git MINOR: h2: don't try to send data before preface h2_snd_buf() must not accept to send data if the preface was not yet received nor sent. At the moment it doesn't happen but it can with server-side H2. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index c01a42a299..c380dc9afa 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -3615,6 +3615,9 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun size_t total = 0; size_t ret; + if (h2s->h2c->st0 < H2_CS_FRAME_H) + return 0; + if (!(h2s->flags & H2_SF_OUTGOING_DATA) && count) h2s->flags |= H2_SF_OUTGOING_DATA;