MINOR: h2/mux-h2: Add flags to notify the response is known to have no body
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Dec 2020 13:26:36 +0000 (14:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Jan 2021 15:37:14 +0000 (16:37 +0100)
commit7d247f0771a48078a5b8c1cf3577c029096be492
tree12ec63d1048626414ecdcf6e3bc93c77d2e5e851
parentf3e7619041dee3d61db7a6756e220ca15895c0da
MINOR: h2/mux-h2: Add flags to notify the response is known to have no body

The H2 message flag H2_MSGF_BODYLESS_RSP is now used during the request or
the response parsing to notify the mux that, considering the parsed message,
the response is known to have no body. This happens during HEAD requests
parsing and during 204/304 responses parsing.

On the H2 multiplexer, the equivalent flag is set on H2 streams. Thus the
H2_SF_BODYLESS_RESP flag is set on a H2 stream if the H2_MSGF_BODYLESS_RSP
is found after a HEADERS frame parsing. Conversely, this flag is also set
when a HEADERS frame is emitted for HEAD requests and for 204/304 responses.

The H2_SF_BODYLESS_RESP flag will be used to ignore data payload from the
response but not the trailers.
include/haproxy/h2.h
src/h2.c
src/mux_h2.c