pub struct Resolver { /* private fields */ }Expand description
An accepted request stream whose headers have not been read yet.
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub async fn resolve(self) -> Result<(Request, Stream), StreamError>
pub async fn resolve(self) -> Result<(Request, Stream), StreamError>
Reads and validates the request headers, giving up after one QUIC idle timeout.
On failure the stream has already been ended – reset and stopped for a malformed request, or the whole connection closed for a frame sequence that cannot be parsed – so the caller has nothing left to do but log it.
§The deadline
A peer opens a request stream by sending on it, and may then send one
byte and stop. Nothing in HTTP/3 obliges it to finish the request, and
the QUIC idle timeout is no backstop while crate::quic’s keep-alive
PINGs are being answered by its stack, so without a deadline each such
stream parks a task until the connection ends – max_streams_bidi of
them per connection, at a byte apiece, from a peer that has not
authenticated (D76). The bound is the connection’s own idle timeout,
which is the same value crate::quic put in its transport parameters.
The stream is the only thing a lapsed deadline ends: it is reset and stopped, and the connection carries on serving everything else on it.