]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: h2: send a GOAWAY frame when dealing with an empty response
authorWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 06:41:55 +0000 (07:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:19 +0000 (18:16 +0100)
commita1349f020787ee7355c0d088f8054713fa25e069
treed6d5492f961f6534eba513818ba9ade079e7378f
parentaf1e4f5167062d5127a446e1bd63b4fd6185b7e6
MEDIUM: h2: send a GOAWAY frame when dealing with an empty response

Given that we're processing data produced by haproxy, we know that the
situations where haproxy doesn't return anything are :
  - request timeout with option http-ignore-probes : there's no reason to
    hit this since we're creating the stream with the request into it ;

  - tcp-request content reject : this definitely means we want to kill the
    connection and abort keep-alive and any further processing ;

  - using /dev/null as the error file to hide an error

In practice it appears that using the abort on empty response as a hint to
trigger a connection close is very appropriate to continue to give the
control over the connection management. This patch thus tries to send a
GOAWAY frame with the max_id presented as the last stream ID, then sends
an RST_STREAM for the current stream. For the client, this means that the
connection must be shut down immediately after processing the last pending
streams and that the current stream is aborted. This way it's still possible
to force connections to be closed using tcp-request rules.
src/mux_h2.c