]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: mux-h1: Create the client stream as later as possible
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 6 Oct 2020 15:45:34 +0000 (17:45 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Dec 2020 13:41:49 +0000 (14:41 +0100)
commitc4bfa59f1d534f226d309c9932c0d35b279cffe7
tree7851ae450c93449442820bb28906c3b159cf3ca5
parentc18fc234d975775e3d3e0b69a692c222ae4172bb
MAJOR: mux-h1: Create the client stream as later as possible

This is the reason for all previous patches. The conn-stream and the
associated stream are created as later as possible. It only concerns the
frontend connections. But it means the request headers, and possibly the
first data block, are received and parsed before the conn-stream
creation. To do so, an embryonic H1 stream, with no conn-stream, is
created. The result of this "early parsing" is stored in its rx buffer, used
to fill the request channel when the stream is created. During this step,
some HTTP errors may be returned by the mux. It must also handle
http-request/keep-alive timeouts. A significative change is about H1 to H2
upgrade. It happens very early now, and no H1 stream are created (and thus
of course no conn-stream).

The most important part of this patch is located to the h1_process()
function. Because it must trigger the parsing when there is no H1
stream. h1_recv() function has also been simplified.
src/mux_h1.c