]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-h1: Close server connection if input data remains in h1_detach()
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 12:51:06 +0000 (14:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 12:51:08 +0000 (14:51 +0200)
commitf1204b8933ac5ac777f5dffb9dea6065fd30a03c
treec86ea8b0a2d5204c747d85e5909098717b218282
parentb0821865285194390c64f741be5adced4227b352
BUG/MINOR: mux-h1: Close server connection if input data remains in h1_detach()

With the previous commit 03627245c ("BUG/MEDIUM: mux-h1: Trim excess server data
at the end of a transaction"), we try to avoid to handle junk data coming from a
server as a response. But it only works for data already received. Starting from
the moment a server sends an invalid response, it is safer to close the
connection too, because more data may come after and there is no good reason to
handle them.

So now, when a conn_stream is detached from a server connection, if there are
some unexpected input data, we simply trim them and close the connection
ASAP. We don't close it immediately only if there are still some outgoing data
to deliver to the server.

This patch must be backported to 2.0 and 1.9.
src/mux_h1.c