mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
BUG/MEDIUM: stconn: Don't forward channel data if input data must be filtered
Once data are received and placed in a channel buffer, if it is possible, outgoing data are immediately forwarded. But we must take care to not do so if there is also pending input data and a filter registered on the channel. It is especially important for HTX streams because the HTX may be altered, especially the extra field. And it is indeed an issue with the HTTP compression filter and the H1 multiplexer. The wrong chunk size may be announced leading to an internal error. This patch should fix the issue #2530. It must be backported to all stable versions.
This commit is contained in:
parent
ffe0874cfb
commit
50d8c18742
1 changed files with 2 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include <haproxy/applet.h>
|
||||
#include <haproxy/connection.h>
|
||||
#include <haproxy/check.h>
|
||||
#include <haproxy/filters.h>
|
||||
#include <haproxy/http_ana.h>
|
||||
#include <haproxy/pipe.h>
|
||||
#include <haproxy/pool.h>
|
||||
|
|
@ -1102,6 +1103,7 @@ void sc_notify(struct stconn *sc)
|
|||
*/
|
||||
if (sc_ep_have_ff_data(sc_opposite(sc)) ||
|
||||
(co_data(ic) && sc_ep_test(sco, SE_FL_WAIT_DATA) &&
|
||||
(!HAS_DATA_FILTERS(__sc_strm(sc), ic) || channel_input_data(ic) == 0) &&
|
||||
(!(sc->flags & SC_FL_SND_EXP_MORE) || channel_full(ic, co_data(ic)) || channel_input_data(ic) == 0))) {
|
||||
int new_len, last_len;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue