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/http/quic_spdy_session_test.cc b/quic/core/http/quic_spdy_session_test.cc
index 27717ab..b37246a 100644
--- a/quic/core/http/quic_spdy_session_test.cc
+++ b/quic/core/http/quic_spdy_session_test.cc
@@ -32,6 +32,7 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_text_utils.h"
#include "net/third_party/quiche/src/quic/test_tools/qpack/qpack_encoder_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/qpack/qpack_header_table_peer.h"
+#include "net/third_party/quiche/src/quic/test_tools/qpack/qpack_test_utils.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_config_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_connection_peer.h"
#include "net/third_party/quiche/src/quic/test_tools/quic_flow_controller_peer.h"
@@ -2025,6 +2026,14 @@
}
TEST_P(QuicSpdySessionTestServer, DonotRetransmitDataOfClosedStreams) {
+ // Resetting a stream will send a QPACK Stream Cancellation instruction on the
+ // decoder stream. For simplicity, ignore writes on this stream.
+ NoopQpackStreamSenderDelegate qpack_stream_sender_delegate;
+ if (VersionUsesHttp3(transport_version())) {
+ session_.qpack_decoder()->set_qpack_stream_sender_delegate(
+ &qpack_stream_sender_delegate);
+ }
+
InSequence s;
TestStream* stream2 = session_.CreateOutgoingBidirectionalStream();