From: Christopher Faulet Date: Mon, 25 Feb 2019 14:50:12 +0000 (+0100) Subject: BUG/MINOR: channel: Set CF_WROTE_DATA when outgoing data are skipped X-Git-Tag: v2.0-dev1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=729b5b308cc8c595e66573e9789ffb09e425c711;p=thirdparty%2Fhaproxy.git BUG/MINOR: channel: Set CF_WROTE_DATA when outgoing data are skipped in co_skip(), the flag CF_WRITE_PARTIAL is set on the channel. The flag CF_WROTE_DATA must also be set to notify the channel some data were sent. This patch must be backported to 1.9. --- diff --git a/include/proto/channel.h b/include/proto/channel.h index d16b0e7306..017c5d1798 100644 --- a/include/proto/channel.h +++ b/include/proto/channel.h @@ -910,7 +910,7 @@ static inline void channel_slow_realign(struct channel *chn, char *swap) * when data have been read directly from the buffer. It is illegal to call * this function with causing a wrapping at the end of the buffer. It's * the caller's responsibility to ensure that is never larger than - * chn->o. Channel flag WRITE_PARTIAL is set. + * chn->o. Channel flags WRITE_PARTIAL and WROTE_DATA are set. */ static inline void co_skip(struct channel *chn, int len) { @@ -919,9 +919,10 @@ static inline void co_skip(struct channel *chn, int len) c_realign_if_empty(chn); /* notify that some data was written to the SI from the buffer */ - chn->flags |= CF_WRITE_PARTIAL; + chn->flags |= CF_WRITE_PARTIAL | CF_WROTE_DATA; } + /* Tries to copy chunk into the channel's buffer after length controls. * The chn->o and to_forward pointers are updated. If the channel's input is * closed, -2 is returned. If the block is too large for this buffer, -3 is