]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: h2: implement the response HEADERS frame to encode the H1 response
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 17:58:20 +0000 (19:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:19 +0000 (18:16 +0100)
commit9e5ae1d7218ccf93a2d62e7b195396b1ab14857c
tree1952e03e5332dbe2ed23ace4083a5c6d4f79ee5f
parent68dd9856cee6689a4be202a9ba6edadacc324f8b
MEDIUM: h2: implement the response HEADERS frame to encode the H1 response

This calls the h1 response parser and feeds the output through the hpack
encoder to produce stateless HPACK bytecode into an output chunk. For now
it's a bit naive but reasonably efficient.

The HPACK encoder relies on hpack_encode_header() so that the most common
response header fields are encoded based on the static header table. The
forbidden header field names (connection, proxy-connection, upgrade,
transfer-encoding, keep-alive) are dropped before calling the hpack
encoder.

A new flag (H2_CF_HEADERS_SENT) is set once such a frame is emitted. It
will be used to know if we can send an empty DATA+ES frame to use as a
shutdown() signal or if we have to use RST_STREAM.
src/mux_h2.c