]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-h1: Add parsing of incoming and ougoing HTTP messages
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 20 Sep 2018 14:14:40 +0000 (16:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 21:02:41 +0000 (22:02 +0100)
commit129817b3946c6def334c4c26bc41225492244c7b
treed7bbe0111b4facc5b8221c8ef8a82dba2334d6db
parent51dbc94d48bf6011d088ba8a0927176b39e60991
MEDIUM: mux-h1: Add parsing of incoming and ougoing HTTP messages

For now, it only parses and transfers data. There is no internal representation
yet. It means the stream still need to parse it too. So a message is parsed 3
times today: one time by each muxes (the client one and the server one) and
another time by the stream. This is of course inefficient. But don't worry, it
is only a transitionnal state. And this mux is optional for now.

BTW, headers and body parsing are now handled using same functions than the mux
H2. Request/Response synchronization is also handled. The mux's task is now used
to catch client/http-request timeouts. Others timeouts are still handled by the
stream. On the clien-side, the stream is created once headers are fully parsed
and body parsing starts only when heeaders are transferred to the stream (ie,
copied into channel buffer).

There is still some known limitations here and there. But, it works in the
common cases. Bad message are not captured and some logs are emitted when errors
occur, only if no stream are attached to the mux. Otherwise, data are
transferred and we let the stream handles errors itself.
src/mux_h1.c