Remove static stream checks in QuicSession::OnRstStream() and let static sub-streams handle it.
The advantage of having sub stream classes override rather than QuicStream base class sanity check is that HTTP/3 streams are now able to throw HTTP/3 specific errors.
gfe-relnote: no behavior change. not protected.
PiperOrigin-RevId: 299190484
Change-Id: Icaa957f91eba4acb3518515b75d205bc22001ddc
diff --git a/quic/core/http/quic_headers_stream.cc b/quic/core/http/quic_headers_stream.cc
index 1e7feb3..8157dae 100644
--- a/quic/core/http/quic_headers_stream.cc
+++ b/quic/core/http/quic_headers_stream.cc
@@ -155,4 +155,9 @@
}
}
+void QuicHeadersStream::OnStreamReset(const QuicRstStreamFrame& /*frame*/) {
+ stream_delegate()->OnStreamError(QUIC_INVALID_STREAM_ID,
+ "Attempt to reset headers stream");
+}
+
} // namespace quic