From 6bf641a61dd00a2e4e60790e59c8bd1696c0163c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 8 Oct 2018 09:43:03 +0200 Subject: [PATCH] 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. --- src/mux_h2.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.3