BUG/MINOR: mux-h1: Handle keep-alive timeout for idle frontend connections
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Dec 2020 10:42:53 +0000 (11:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Dec 2020 13:41:48 +0000 (14:41 +0100)
commit268c92e2f8454569c1d2354f22cbe3187d548c3c
tree272fa2f6d5fadfa4f45e1b76b51a881b6f8ffa3b
parent7da02dd308baa40df43b87b5fdca3af8c49e48a8
BUG/MINOR: mux-h1: Handle keep-alive timeout for idle frontend connections

IDLE frontend connections have no stream attached. The stream is only
created when new data are received, when the parsing of the next request
starts. Thus the keep-alive timeout, handled into the HTTP analysers, is not
considered while nothing is received. But this is especially when this
timeout must be considered. Concretely the http-keep-alive is ignored while
no data are received. Only the client timeout is used. It will only be
considered on incomplete requests, if the http-request timeout is not set.

To fix the bug, the http-keep-alive timeout must be handled at the mux
level, for IDLE frontend connection only.

This patch should fix the issue #984. It must be backported as far as
2.2. On prior versions, the stream is created earlier. So, it is not a
problem, except if this behavior changes of course (it was an optim of the
2.2, but don't remember the commit).
src/mux_h1.c