From: Christopher Faulet Date: Mon, 15 Jul 2019 09:15:33 +0000 (+0200) Subject: MINOR: mux-h2: Don't adjust anymore the amount of data sent in h2_snd_buf() X-Git-Tag: v2.1-dev2~392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d36e1c282d8b27752f35595a4bf09e5d58f3990;p=thirdparty%2Fhaproxy.git MINOR: mux-h2: Don't adjust anymore the amount of data sent in h2_snd_buf() Because the infinite forward is HTX aware, it is useless to tinker with the number of bytes really sent. This was fixed long ago for the H1 and forgotten to do so for the H2. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 5bb851819d..ab781ddebb 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -5453,7 +5453,6 @@ static void h2_stop_senders(struct h2c *h2c) static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t count, int flags) { struct h2s *h2s = cs->ctx; - size_t orig_count = count; size_t total = 0; size_t ret; struct htx *htx; @@ -5639,14 +5638,6 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun (h2s->flags & H2_SF_BLK_MBUSY)) h2_stop_senders(h2s->h2c); - /* If we're running HTX, and we read the whole buffer, then pretend - * we read exactly what the caller specified, as with HTX the caller - * will always give the buffer size, instead of the amount of data - * available. - */ - if (htx && !b_data(buf)) - total = orig_count; - if (total > 0) { if (!(h2s->h2c->wait_event.events & SUB_RETRY_SEND)) tasklet_wakeup(h2s->h2c->wait_event.tasklet);