MEDIUM: mux-h2: Don't mix HTTP and tunneled data in the same buffer
For a tunneled stream, the end of the HTTP message is reported just after
the headers while the tunneled data are received after. Because the
information about the end of the message was a flag on the HTX message
itself, both could be stored in the same buffer without any issue.
This is no longer true. The end of the message is now carried by the tail
block of the HTX message. So nothing must be added after this block,
otherwise the message would no longer be seen as ended. It means HTTP data
and tunneled data must never be mixed in the same buffer.
Two changes are required for that:
* h2s_may_append_to_rxbuf() now refuses to append data to an rxbuf
carrying a message already ended. h2_frt_transfer_data() thus gets an
extra rxbuf to store the tunneled data. If no buffer is available, the
demux is blocked, as usual.
* h2_rcv_buf() no longer transfers an rxbuf to the upper layer when the
HTX message in the channel buffer was already ended. SE_FL_RCV_MORE and
SE_FL_WANT_ROOM are reported instead, so the transfer is retried once
the HTTP part was consumed.
Note the H1 multiplexer does not have this issue because the demux is
blocked, thanks to H1S_F_RX_BLK flag, until the tunnel is established.
This patch is a prerequisite to be able to harden the HTX API and forbid
any addition in a message already ended.