MEDIUM: h2: send the H1 response body as DATA frames

The H1 response data are processed (either following content-length or
chunks) and emitted as H2 DATA frames. In the case of content-length,
the maximum size permitted by the mux buffer, the max frame size, the
connection's window and the stream's window it used to determine the
frame size. For chunked encoding, the same limitation applies, but in
addition, each chunk leads to a distinct frame. This could be improved
in the future to aggregate chunks into larger frames.

Streams blocked on the connection's flow control subscribe to the
connection's fctl_list to be woken up when the window opens again.

Streams blocked on their own flow control don't subscribe to anything,
they just sit waiting for window update frames to reopen the window.

The connection-close mode (without content-length) partially works thanks
to the fact that the SHUTW event leads to a close of the stream. In
practice an empty DATA frame should be sent in this case though.
1 file changed