diff --git a/src/mux_h2.c b/src/mux_h2.c index c06d5d68e..5bb851819 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2177,7 +2177,7 @@ static int h2c_frt_handle_data(struct h2c *h2c, struct h2s *h2s) goto strm_err; } - if ((h2s->flags & H2_SF_DATA_CLEN) && h2c->dfl > h2s->body_len) { + if ((h2s->flags & H2_SF_DATA_CLEN) && (h2c->dfl - h2c->dpl) > h2s->body_len) { /* RFC7540#8.1.2 */ error = H2_ERR_PROTOCOL_ERROR; goto strm_err;