jetty.project
jetty.project copied to clipboard
Stream cancellation is never called on QpackDecoder/QpackEncoder
Description
QpackDecoder
and QpackEncoder
have a streamCancellation(long streamId)
method to notify them in case a HTTP/3 stream is cancelled. On the decoder this sends an instruction to the remote encoder, but on the encoder it sends no instruction and just cleans up some local state.
These methods are currently unused and never called by the Jetty HTTP/3 implementation.
@sbordet This seems to be the problematic situation.
- The encoder sends
EncodedFieldSection
with non-zero required insert count. - Reading is abandoned before this
EncodedFieldSection
is received. - The decoder will never acknowledge that encoded section because it never receives it.
So any references taken by the encoder to send the EncodedFieldSection
will never be released as no SectionAcknowledgement
is received. So for each EncodedFieldSection
sent from the encoder there really does need to be either a SectionAcknowledgement
or a StreamCancellation
instruction sent from the decoder.
When an endpoint receives a stream reset before the end of a stream
or before all encoded field sections are processed on that stream, or
when it abandons reading of a stream, it generates a Stream
Cancellation instruction; see [Section 4.4.2]. This signals to the
encoder that all references to the dynamic table on that stream are
no longer outstanding.
...
The Section Acknowledgment and Stream Cancellation instructions
permit the encoder to remove references to entries in the dynamic
table.
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.
@sbordet do you know where we can receive the HTTP/3 stream cancellation notification so we can call QPACK.
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.