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.
This commit is contained in:
Willy Tarreau 2018-10-08 09:43:03 +02:00
parent 7f0cc49645
commit 6bf641a61d

View File

@ -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;