]> git.kaiwu.me - haproxy.git/commit
MEDIUM: h2: basic processing of HEADERS frame
authorWilly Tarreau <w@1wt.eu>
Fri, 13 Oct 2017 17:23:14 +0000 (19:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:18 +0000 (18:16 +0100)
commit13278b44b17cf63b0a9606a847eb7ea39b24587e
tree72a315356fe48a1dae1f289ad79fe1e5b47f1cd8
parent45f752e037b15fcd07d4620fbc39b8b192fa0bda
MEDIUM: h2: basic processing of HEADERS frame

This takes care of creating a new h2s and a new conn_stream when a
HEADERS frame arrives. The recv() callback from the data layer is then
called to extract the frame into the stream's buffer. It is verified
that the stream ID is strictly greater than the known max stream ID.
And the last_id is updated if the current request is properly converted.
The streams are created in open or half-closed(remote) states.

For now there are some limitations :
  - frames without END_HEADERS are rejected (CONTINUATION not supported
    yet, will require some more changes so that the stream processor
    checks the H2 frame header by itself and steals the frames from the
    connection)
  - padding/stream_dep/priority are currently ignored
  - limited error handling, could be improved

But at least the request is properly decoded, transcoded and processed.
src/mux_h2.c