]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Refresh H1 connection timeout after a synchronous send
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Aug 2020 09:31:16 +0000 (11:31 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Aug 2020 12:29:06 +0000 (14:29 +0200)
commit7a145d682379a99c443c7888baa9c4c68847eddc
treed451c5711ad78147a833a96a57bced592312c803
parentbab67529c1c59513880dbb398623e96d8cfcf7ee
BUG/MEDIUM: mux-h1: Refresh H1 connection timeout after a synchronous send

The H1 multiplexer is able to perform synchronous send. When a large body is
transfer, if nothing is received and if no error or shutdown occurs, it is
possible to not go down at the H1 connection level to do I/O for a long
time. When this happens, we must still take care to refresh the H1 connection
timeout. Otherwise it is possible to hit the connection timeout during the
transfer while it should not expire.

This bug exists because only h1_process() refresh the H1 connection timeout. To
fix the bug, h1_snd_buf() must also refresh this timeout. To make things more
readable, a dedicated function has been introduced and called to refresh the
timeout.

This bug exists on all HTX versions. But it is harder to hit it on 2.1 and below
because when a H1 mux is initialized, we actively try to read data instead of
subscribing for receiving. So there is at least one call to h1_process().

This patch should fix the issue #790. It must be backported as far as 2.0.
src/mux_h1.c