BUG/MEDIUM: mux-h1: Fix handling of responses to CONNECT other than 200-ok

For a CONNECT request, if the tunnel establishment is refused by the server,
the connection is always closed on the client side. This happen because we
fail to detect the end of the tunnel. Now, when a reponse other than 200-ok
is received, the request is switch back to MSG_DONE state and the end of the
transaction is handled as a classical request/response exchange.

This patch should fix the issue #1140. It must be backported as far as
2.0. There is no upstream commit ID because tunnel management was already
fixed in a non-backportable way in 2.4.

(cherry picked from commit ecae6e9e3c3313ed7567b0b5799dbabfc4168da6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit ac4f8b256186e508bd68c26dbade8ac4b3358097)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 6d70ebf52f108193cabcce1aaac75341fcd1f1d2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed