You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calls to send_request(), send_response(), send_response_with_priority(),
and send_additional_headers() can fail with a StreamBlocked
error indicating lack of underlying transport capacity. When this
occurs, applications are expected to retry the operation when
the stream is later reported as writable.
However, certain conditions could mean that sufficient capacity
might never be made available, effectively permenantly blocking
header sends. The root cause of this problem was the choice to enforce
that a HEADERS frame is always sent (buffered into a quiche stream)
in whole.
This change adds new functions related to stream management and header
sending to support a streaming send design. These will produce a HEADERS
frame that can be sent in whole or in part, depending on available
capacity. When a frame is only partly sent, applications are notified and
can resume sending using the new continue_partial_headers()
method, once the stream is writable.
The new functions unify how clients and servers send headers.
For a client, the expected sequence is now something like:
0. Decide to initate a request
1. reserve_request_stream() - reserves a stream if limits allow
2. stream_headers() - inititates streaming of a HEADERS frame
3. continue_partial_headers() - if stream_headers() returned Error::PartialHeader
For a server, the expected sequence is now something like:
0. Receive a request via the poll() function and decide to respond
1. stream_priority() - set the stream's sending priority per RFC 9218
3. stream_headers() - inititates streaming of a HEADERS frame
4. continue_partial_headers() - if stream_headers return Error::PartialHeader
While headers are being streamed, other operations that
would cause an HTTP/3 frame to be sent on the stream are
prevented. HEADERS frames must be sent completely before
other operations are successful.
Applications do not need to manage the partial HEADERS
buffer, this is dealt with inside quiche.
Co-authored-by: Gregor Maier <[email protected]>
0 commit comments