]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stream-int: Try to read data even if channel's buffer seems to be full
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 Oct 2018 13:29:21 +0000 (15:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Nov 2018 09:18:37 +0000 (10:18 +0100)
commit4eb7d745e26434b08eaf91e6448bec64788f04e2
tree5eb1f8dcd1437a44f605fe97f467ae78893a2b5b
parentb3e0de46ce54de066d329253625d734b01134aa0
MEDIUM: stream-int: Try to read data even if channel's buffer seems to be full

Before calling the mux to get incoming data, we get the amount of space
available at the input of the buffer. If there is no space, we don't try to read
more data. This is good enough when raw data are stored in the buffer. But this
info has no meaning when structured data are stored. Because with the HTTP
refactoring, such kind of data will be stored in buffers, it is a bit annoying.

So, to avoid any problems, we always call the mux. It is the mux's responsiblity
to notify the stream interface it needs more space to store more data. This must
be done by setting the flag CS_FL_RCV_MORE on the conn_stream.

This is exactly what we do in the pass-through mux when <count> is null.
src/mux_pt.c
src/stream_interface.c