Send Stream Cancellation QPACK instruction.
According to
https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#name-abandonment-of-a-stream,
this should be done when a stream reset is received before the end of a stream
or before all header blocks are processed on that stream, or when reading of a
stream is abandoned.
gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99.
PiperOrigin-RevId: 282861038
Change-Id: Ibf6f69e29f98022e0eebf89676783fa3ce26541a
diff --git a/quic/core/qpack/qpack_decoder.cc b/quic/core/qpack/qpack_decoder.cc
index 4f39e3b..3ae6bce 100644
--- a/quic/core/qpack/qpack_decoder.cc
+++ b/quic/core/qpack/qpack_decoder.cc
@@ -27,10 +27,10 @@
QpackDecoder::~QpackDecoder() {}
void QpackDecoder::OnStreamReset(QuicStreamId stream_id) {
- // TODO(bnc): SendStreamCancellation should not be called if maximum dynamic
- // table capacity is zero.
- decoder_stream_sender_.SendStreamCancellation(stream_id);
- decoder_stream_sender_.Flush();
+ if (header_table_.maximum_dynamic_table_capacity() > 0) {
+ decoder_stream_sender_.SendStreamCancellation(stream_id);
+ decoder_stream_sender_.Flush();
+ }
}
bool QpackDecoder::OnStreamBlocked(QuicStreamId stream_id) {