Add HTTP/3 error codes, use them in HttpDecoder and for unexpected frames in QuicSpdyStream and QuicReceiveControlStream. ENUM_VALUE_OK=Only changing value of sentinel entry QUIC_LAST_ERROR. gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99. PiperOrigin-RevId: 290374408 Change-Id: I90837f021f0dd585f8015d2fcae37d0d0eacfed6
diff --git a/quic/core/http/quic_spdy_stream.cc b/quic/core/http/quic_spdy_stream.cc index 195f92b..5d5c176 100644 --- a/quic/core/http/quic_spdy_stream.cc +++ b/quic/core/http/quic_spdy_stream.cc
@@ -40,9 +40,9 @@ HttpDecoderVisitor(const HttpDecoderVisitor&) = delete; HttpDecoderVisitor& operator=(const HttpDecoderVisitor&) = delete; - void OnError(HttpDecoder* /*decoder*/) override { + void OnError(HttpDecoder* decoder) override { stream_->session()->connection()->CloseConnection( - QUIC_HTTP_DECODER_ERROR, "Http decoder internal error", + decoder->error(), decoder->error_detail(), ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); } @@ -171,7 +171,7 @@ private: void CloseConnectionOnWrongFrame(quiche::QuicheStringPiece frame_type) { stream_->session()->connection()->CloseConnection( - QUIC_HTTP_DECODER_ERROR, + QUIC_HTTP_FRAME_UNEXPECTED_ON_SPDY_STREAM, quiche::QuicheStrCat(frame_type, " frame received on data stream"), ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); }